Update sync_site.yml
[m6w6/m6w6.github.io] / .github / workflows / sync_site.yml
index f64f0a6df551cb31620ab3f38c1b1721533083ff..288c4676b45d96c2debb6330e2c134f7568f8dd4 100644 (file)
@@ -11,26 +11,23 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/github-script@v5
-        id: shitshow
         with:
-          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({
+            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);
-            return artifact_url.headers["location"];
-      - run: curl -sSLO ${{ steps.shitshow.outputs.result }}
+            github.exec.exec("tar xz", [], {
+              input: artifact.data
+            });
       - run: ls -al