X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fm6w6.github.io;a=blobdiff_plain;f=.github%2Fworkflows%2Fsync_site.yml;h=f64f0a6df551cb31620ab3f38c1b1721533083ff;hp=5e9fd339c49769ebeb4b7004635148c21a9ecf3c;hb=65d7ac376a097c804d408334f72caf4e65f526be;hpb=888033b2b30d80b7dee30237224daf7c4efa913c diff --git a/.github/workflows/sync_site.yml b/.github/workflows/sync_site.yml index 5e9fd33..f64f0a6 100644 --- a/.github/workflows/sync_site.yml +++ b/.github/workflows/sync_site.yml @@ -10,10 +10,27 @@ 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: | + console.log(context); + 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