Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to V4 broke the deploy step #286

Closed
AndreiBarbuOz opened this issue Dec 20, 2023 · 9 comments · Fixed by #288
Closed

Bump to V4 broke the deploy step #286

AndreiBarbuOz opened this issue Dec 20, 2023 · 9 comments · Fixed by #288
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@AndreiBarbuOz
Copy link

Initial failure with permissions:

permissions:
  contents: read
  pages: write
  id-token: write

resulted in:

Fetching artifact metadata for github-pages in run 0000000000
Error: Fetching artifact metadata failed. Is githubstatus.com reporting issues with API requests, Pages or Actions? Please re-run the deployment at a later time.
Error: HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/actions/deploy-pages/v4/node_modules/@octokit/request/dist-node/index.js:124:1
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at getArtifactMetadata (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/api-client.js:[10](https://github.com/0000000000/actions/runs/0000000000/job/0000000000#step:2:11):1)
    at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/deployment.js:66:1)
    at main (/home/runner/work/_actions/actions/deploy-pages/v4/src/index.js:30:1)
Error: Error: Failed to create deployment (status: 403) with build version 0000000000[15](https://github.com/0000000000/actions/runs/0000000000/job/0000000000#step:2:16). Ensure GITHUB_TOKEN has permission "pages: write".

After updated the permissions to:

permissions:
  contents: read
  pages: write
  id-token: write
  actions: read

New failure:

Fetching artifact metadata for github-pages in run 0000000000
Creating Pages deployment with payload:
{
	"artifact_id": [11](https://github.com/0000000000/actions/runs/0000000000/job/0000000000#step:2:12)0000000000,
	"pages_build_version": "0000000000",
	"oidc_token": 0000000000"
}
Error: Creating Pages deployment failed
Error: HttpError: No artifact_url provided
    at /home/runner/work/_actions/actions/deploy-pages/v4/node_modules/@octokit/request/dist-node/index.js:[12](https://github.com/0000000000/actions/runs/0000000000/job/0000000000#step:2:13)4:1
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at createPagesDeployment (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/api-client.js:68:1)
    at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/deployment.js:78:1)
    at main (/home/runner/work/_actions/actions/deploy-pages/v4/src/index.js:30:1)
Error: Error: Failed to create deployment (status: 400) with build version 0000000000[16](https://github.com/0000000000/actions/runs/0000000000/job/0000000000#step:2:17)0000000000[19](https://github.com/0000000000/actions/runs/0000000000/job/0000000000#step:2:20)0000000000. Responded with: No artifact_url provided
@luizrcs
Copy link

luizrcs commented Dec 20, 2023

Same here, and it was driving me crazy until I saw these issues, as I thought I was simply missing something obvious on the setup. I checked the failed job logs and it says explicitly right at the beginning the pages write permission is given.

davwheat added a commit to davwheat/rail-announcements that referenced this issue Dec 20, 2023
Ry0taK added a commit to gnknzm/gnknzm.net that referenced this issue Dec 20, 2023
@jamezp
Copy link

jamezp commented Dec 20, 2023

Just another same here https://github.com/wildfly/wildfly-maven-plugin/actions/runs/7270026747. Could this potentially be related to actions/download-artifact#249?

@JamesMGreene
Copy link
Contributor

You correctly identified the first issue that workflows will need the newly required actions: read permission for v4 (v4.0.0, at least).

https://github.com/actions/deploy-pages/pull/283/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R33

We're going to investigate removing the need for that new permission in an in-flight follow-up PR today, so please bear with us:

But, as a short-term workaround, I believe adding the actions: read permission to your workflow/job will be required for now.

The second issue you're hitting is a bit more of a mystery offhand. We'll investigate today! 🔍

@JamesMGreene
Copy link
Contributor

We've identified an issue on the API internal side. A fix is in progress and should be rolled out in the next few hours. Thank you all for your reporting and patience, and our apologies for the temporary inconvenience! 🙇

P.S. If anyone needs a short-term workaround, please revert to using the previous major versions of actions/upload-pages-artifact and actions/deploy-pages until we can get the fix shipped.

@JamesMGreene
Copy link
Contributor

We believe this should be resolved as of ~4 hours ago, assuming you also include the actions: read permission (for now). Please give it another try, but do let us know if you still encounter friction. 🙇

@ollecoffee
Copy link

Still failing on v4 here https://github.com/ollegkz/olle.coffee/actions/runs/7285230140 (with read permissions for actions) :(

@JamesMGreene
Copy link
Contributor

@ollegkz You need to update your build job to use actions/upload-pages-artifact@v3 as well. They're using a new service, so both the upload and deploy have to be targeting it.

@ollecoffee
Copy link

Aww, long wait then I guess D: https://github.com/withastro/action/blob/main/action.yml#L96. Thanks for the explanation <3

@JamesMGreene
Copy link
Contributor

📣 The latest release, v4.0.1, has removed the need for the actions: read permission that v4.0.0 introduced. 🪓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
5 participants