From: Michael Wallner Date: Fri, 21 Jan 2022 16:55:31 +0000 (+0100) Subject: Update sync_site.yml X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fm6w6.github.io;a=commitdiff_plain;h=492a5e79cdb82e42d8b871e62de4bc528b6b5280 Update sync_site.yml --- diff --git a/.github/workflows/sync_site.yml b/.github/workflows/sync_site.yml index 5e9fd33..f14288e 100644 --- a/.github/workflows/sync_site.yml +++ b/.github/workflows/sync_site.yml @@ -10,10 +10,26 @@ jobs: sync: runs-on: ubuntu-latest steps: - - uses: dawidd6/action-download-artifact@v2 + - uses: actions/github-script@v5 + id: shitshow with: - workflow: pages/pages-build-deployment - workflow_conclusion: success - name: github-pages - - run: tar tf artifact.tar + result-encoding: string + script: | + const artifact_id = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow.run_id, + per_page: 1, + }); + console.log(artifact_id); + const artifact_url = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: artifact_id.data.artifacts[0].id, + archive_format: "zip", + }); + console.log(artifact_url); + return artifact_url.headers["location"]; + - run: curl -sSLO ${{ steps.shitshow.outputs.result }} + - run: ls -al