X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=.github%2Fworkflows%2Fsync_site.yml;h=288c4676b45d96c2debb6330e2c134f7568f8dd4;hb=d52e7c1127ed99a6a194d5f89f5567cf905f0522;hp=5e9fd339c49769ebeb4b7004635148c21a9ecf3c;hpb=888033b2b30d80b7dee30237224daf7c4efa913c;p=m6w6%2Fm6w6.github.io diff --git a/.github/workflows/sync_site.yml b/.github/workflows/sync_site.yml index 5e9fd33..288c467 100644 --- a/.github/workflows/sync_site.yml +++ b/.github/workflows/sync_site.yml @@ -10,10 +10,24 @@ jobs: sync: runs-on: ubuntu-latest steps: - - uses: dawidd6/action-download-artifact@v2 + - uses: actions/github-script@v5 with: - workflow: pages/pages-build-deployment - workflow_conclusion: success - name: github-pages - - run: tar tf artifact.tar + 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, + }); + const artifact = 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); + github.exec.exec("tar xz", [], { + input: artifact.data + }); + - run: ls -al