X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=.github%2Fworkflows%2Fsync_site.yml;h=b5e18f881be2ecbf2ac71be9f5b4eb2a3065f88f;hb=HEAD;hp=7eed3b1f7fb20d92e8da7efc4e03498eefd0d292;hpb=37a56c71ddf79794ffe4f9936141c38ec606c4c5;p=m6w6%2Fm6w6.github.io diff --git a/.github/workflows/sync_site.yml b/.github/workflows/sync_site.yml index 7eed3b1..b5e18f8 100644 --- a/.github/workflows/sync_site.yml +++ b/.github/workflows/sync_site.yml @@ -1,16 +1,17 @@ - name: sync_site - on: workflow_run: workflows: [pages-build-deployment] types: [completed] - +env: + SYNC_SECRET: ${{ secrets.SYNC_SECRET }} + SYNC_COMMAND: ${{ secrets.SYNC_COMMAND }} jobs: sync: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v5 + - run: umask 0077 && echo "${{ env.SYNC_SECRET }}" >/tmp/sync_secret + - uses: actions/github-script@v7 with: script: | const artifact_id = await github.rest.actions.listWorkflowRunArtifacts({ @@ -25,8 +26,6 @@ jobs: artifact_id: artifact_id.data.artifacts[0].id, archive_format: "zip", }); - await exec.exec("tar xz", [], { + await exec.exec(process.env.SYNC_COMMAND, [], { input: Buffer.from(artifact.data) }); - - run: ls -al -