diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index c9dfe53..4b7fb88 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -18,10 +18,10 @@ jobs: steps: - name: Download artifact - uses: actions/github-script@v3.1.0 + uses: actions/github-script@v6 with: script: | - const artifacts = await github.actions.listWorkflowRunArtifacts({ + const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, run_id: ${{github.event.workflow_run.id }}, @@ -29,7 +29,7 @@ jobs: const matchArtifact = artifacts.data.artifacts.filter((artifact) => { return artifact.name == "build" })[0]; - const download = await github.actions.downloadArtifact({ + const download = await github.rest.actions.downloadArtifact({ owner: context.repo.owner, repo: context.repo.repo, artifact_id: matchArtifact.id, @@ -49,14 +49,14 @@ jobs: gitHubToken: ${{ secrets.GITHUB_TOKEN }} # GitHub Deployments wranglerVersion: "3" - name: "Comment on PR" - uses: actions/github-script@v3 + uses: actions/github-script@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const fs = require('fs'); try { const issue_number = Number(fs.readFileSync('./build/PR_NR')); - await github.issues.createComment({ + await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue_number,