Update sync_site.yml
[m6w6/m6w6.github.io] / .github / workflows / sync_site.yml
1
2 name: sync_site
3
4 on:
5 workflow_run:
6 workflows: [pages-build-deployment]
7 types: [completed]
8
9 jobs:
10 sync:
11 runs-on: ubuntu-latest
12 steps:
13 - uses: actions/github-script@v5
14 with:
15 script: |
16 const artifact_id = await github.rest.actions.listWorkflowRunArtifacts({
17 owner: context.repo.owner,
18 repo: context.repo.repo,
19 run_id: context.payload.workflow_run.id,
20 per_page: 1,
21 });
22 const artifact = await github.rest.actions.downloadArtifact({
23 owner: context.repo.owner,
24 repo: context.repo.repo,
25 artifact_id: artifact_id.data.artifacts[0].id,
26 archive_format: "zip",
27 });
28 await exec.exec("tar xz", [], {
29 input: artifact.data
30 });
31 - run: ls -al
32