actions / deploy-pages

GitHub Action to publish artifacts to GitHub Pages for deployments
https://pages.github.com
MIT License
656 stars 79 forks source link

Actions fail after update actions/deploy-pages to v4 and actions/upload-pages-artifact to v3 #284

Closed torn4dom4n closed 10 months ago

torn4dom4n commented 10 months ago

I just updated actions/deploy-pages to v4 and actions/upload-pages-artifact to v3 in my repo and got this error:

Run actions/deploy-pages@v4
Fetching artifact metadata for github-pages in run 7264600[9](https://github.com/AREA44/astro-research-theme/actions/runs/7264600911/job/19792767463#step:2:10)[11](https://github.com/AREA44/astro-research-theme/actions/runs/7264600911/job/19792767463#step:2:12)
Creating Pages deployment with payload:
{
    "artifact_id": 1[12](https://github.com/AREA44/astro-research-theme/actions/runs/7264600911/job/19792767463#step:2:13)45035[14](https://github.com/AREA44/astro-research-theme/actions/runs/7264600911/job/19792767463#step:2:15),
    "pages_build_version": "cf67bf05e7d24c255c38726ac891fe4b93fbf25b",
    "oidc_token": "***"
}
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:124: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 cf67bf05e7d24c255c38726ac891fe4b93fbf25b. Responded with: No artifact_url provided

Full log here.

petter commented 10 months ago

Also experiencing this: https://github.com/domstolene/designsystem/actions/runs/7264875307/job/19793326264

luizrcs commented 10 months ago

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.

SaptarshiSarkar12 commented 10 months ago

Same here - https://github.com/SaptarshiSarkar12/Drifty/actions/runs/7270487603

SaptarshiSarkar12 commented 10 months ago

@JamesMGreene Please look into this issue as soon as possible. #287 seems to be a good fix.

davwheat commented 10 months ago

It's currently 10pm in Minneapolis (where his GitHub profile says he's based). Be patient. Workarounds exist.

SaptarshiSarkar12 commented 10 months ago

Oh, yeah. I forgot to check his timezone. I'm extremely sorry. Thank you for informing @davwheat :grin:!

orhun commented 10 months ago

Same error here: https://github.com/orhun/git-cliff/actions/runs/7274801940/job/19821456493

afh commented 10 months ago

Ledger's project website https://ledger-cli.org is also affected by this (see https://github.com/ledger/ledger.github.io/actions/runs/7272871676/job/19828971150)

JamesMGreene commented 10 months ago

This is probably due to your workflows missing the newly required actions: read permission for v4.

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 alleviate this blocker.

davwheat commented 10 months ago

This is probably due to your workflows missing the newly required actions: read permission for v4.

I noticed the docs PR and tried this, but it also didn't help for me. See: https://github.com/davwheat/rail-announcements/actions/runs/7270687779

Workflow: https://github.com/davwheat/rail-announcements/blob/4e2b36306630d1fdfe825e658677979e392a65b7/.github/workflows/smoketest.yml#L89-L92

mikesprague commented 10 months ago

But, as a short-term workaround, I believe adding the actions: read permission to your workflow/job will alleviate this blocker.

This also did not work for me. Same error as without it:

Fetching artifact metadata for pages-api-endpoints in run 7278395179
Creating Pages deployment with payload:
{
    "artifact_id": 1[12](https://github.com/mikesprague/api/actions/runs/7278395179/job/19832554835#step:5:13)705[13](https://github.com/mikesprague/api/actions/runs/7278395179/job/19832554835#step:5:14)38,
    "pages_build_version": "8aff0377aa9ad37ed46fce84654616e21a0f4cd0",
    "oidc_token": "***"
}
Error: Creating Pages deployment failed
Error: HttpError: No artifact_url provided
JamesMGreene commented 10 months ago

Yup, 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.

davwheat commented 10 months ago

Thanks for tracking this down! :)

JamesMGreene commented 10 months ago

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. 🙇

SaptarshiSarkar12 commented 10 months ago

@JamesMGreene Yes, it works now :+1: - https://github.com/SaptarshiSarkar12/Drifty/actions/runs/7283610116. Awesome support :clap:, thank you @JamesMGreene :grin:.

afh commented 10 months ago

Confirming Github actions for the ledger/ledger.github.io repo are back to ✅. Thanks for resolving this, much appreciated 👍

JamesMGreene commented 10 months ago

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

hugolpz commented 3 months ago

Error message

Error actions/checkout@v4, actions/configure-pages@v5, actions/upload-pages-artifact@v3, and actions/deploy-pages@v4 are not allowed to be used in hugolpz/SignesDeBibliotheques. Actions in this workflow must be: within a repository owned by hugolpz.

Solution

I went to and changed the option :

Settings > Actions > General 
Actions permissions
(o) Allow all actions and reusable workflows

image