Skip to content

Intermittent "No artifacts named github-pages" when deploy-pages runs right after upload-pages-artifact in the same job #451

Open

Description

@ctbot000

When upload-pages-artifact and deploy-pages run in the same job, as in the static starter workflow, the artifact lookup can come back empty for an artifact that was finalized a fraction of a second earlier. The versions match (upload-pages-artifact v5.0.0, deploy-pages v5.0.1), so this is not the version mismatch discussed in #305.

From the failing job:

2026-10-07T13:43:59.4747863Z Artifact github-pages successfully finalized. Artifact ID 11486441618
2026-10-07T13:43:59.7518839Z Fetching artifact metadata for "github-pages" in this workflow run
2026-10-07T13:43:59.9097421Z Found 0 artifact(s)
Error: No artifacts named "github-pages" were found for this workflow run. Ensure artifacts are uploaded with actions/upload-artifact@v4 or later.

It is intermittent. That repository deployed 63 times with this layout and 62 runs found the artifact, 7 of them after a shorter gap between finalizing and listing (221–276 ms) than the failing run (277 ms). A new run of the same commit deployed normally.

Re-running, as the error message advises, cannot recover this layout: the re-run uploads a second github-pages artifact to the same run, and the lookup then fails with Multiple artifacts named "github-pages" were unexpectedly found for this workflow run. Artifact count is 2. (#338).

Possible fixes:

  • When no artifact matches, retry listArtifacts() a few times with a short backoff before failing.
  • Deploying by the artifact_id that upload-pages-artifact outputs (Add support for artifact_id input and improve artifact selection for … #399) would skip the lookup altogether.
  • The static starter is the only Pages starter that uploads and deploys in one job; the others upload in a separate build job, so the lookup happens seconds later. Moving the upload into an earlier job fixed it for us.

Activity

  1. 219 remaining items

  2. ckir commented on Nov 24, 2026

    @ckir

    Another occurrence of this, with timings, from a public repository using the same layout (upload-pages-artifact and deploy-pages as consecutive steps of one job, both @v5):

    • Run: https://github.com/ckir/aiplugins/actions/runs/45501962944 (2026-11-24)
    • upload-pages-artifact@v5 (fc324d3) logged Artifact github-pages successfully finalized. Artifact ID 14971178453 at 22:33:33.366.
    • deploy-pages@v5 (368f825) logged Fetching artifact metadata for "github-pages" in this workflow run at 22:33:33.663, about 300 ms later, and then Found 0 artifact(s) at 22:33:33.731, followed by No artifacts named "github-pages" were found for this workflow run.
    • Re-running the failed job in the same run, as the error message advises, then failed with Multiple artifacts named "github-pages" were unexpectedly found for this workflow run. Artifact count is 2., as described above. The run cannot be recovered by re-running it.
    • The previous run of the same workflow on the preceding commit deployed normally.

    This matches the description above (lookup right after finalizing). A short retry of the artifact lookup in deploy-pages, or deploying by artifact_id, would avoid it.

  3. windrover commented on Nov 25, 2026

    @windrover

    Reproduced this in a deliberately minimal public repo, so it is not specific to one project's workflow: https://github.com/windrover/artifact-visibility-probe

    Each run uploads a ~1.9 MB github-pages artifact with actions/upload-pages-artifact@v5 and then runs actions/deploy-pages@v5 immediately; on failure the deploy is retried at +1s/+3s/+7s/+15s/+31s/+63s until the lookup succeeds. I measure first "Found 1 artifact(s)" timestamp - artifact finalize timestamp.

    probe run visibility lag first lookup missed?
    #6, #9, #12 0.46 s, 0.46 s, 0.44 s no
    #10 0.71 s no
    #8, #13 2.09 s, 2.10 s yes, 1 retry
    #7 2.17 s yes, 1 retry
    #11 5.75 s yes, 2 retries

    The very first lookup returned Found 0 artifact(s) in 4 of 8 runs, and the artifact was always visible within ~6 s in the probe.

    In our production repo (same layout) we also saw a much longer tail: artifact finalized at 03:12:07.428Z, Found 0 artifact(s) at 03:12:07.802Z, first Found 1 artifact(s) only at 03:12:53.368Z (~46 s), after which the deployment succeeded (https://github.com/windrover/dsh-table-sync/actions/runs/45537648379). The REST artifacts endpoint reports that artifact id 14988715339 as present and not expired.

    The same class of failure for downloads is tracked in actions/download-artifact#505.

    No root-cause claim from my side - just timings and a public reproducer.

  4. sanmai commented on Nov 25, 2026

    @sanmai

    Adding a short delay works as a workaround.

          - name: Wait for artifact listing
            run: |
              sleep 10
    
          - name: Deploy to GitHub Pages
            id: deployment
            uses: actions/deploy-pages@v5
  5. jamietanna commented on Nov 25, 2026

    @jamietanna

    We're finding that trying to check the artifact is uploaded in the REST API doesn't seem to work (renovatebot/renovate#48385 / renovatebot/renovate#48393) - for folks doing similar, are you finding it's working for you?

  6. jamietanna commented on Nov 25, 2026

    @jamietanna

    renovatebot/renovate#48395 is working well for us right now 🤞🏼 adding retries on the deploy

  7. kubohiroya commented on Nov 25, 2026

    @kubohiroya

    Four observations from hitting this on 2026-11-25 with the same versions (upload-pages-artifact v5, deploy-pages v5.0.1, ubuntu-24.04, both in one job, a 233 MB artifact). They differ from the report above in ways that may matter for the diagnosis.

    1. The stale window can be much wider than a few hundred milliseconds.

    The job uploads a test-evidence artifact earlier, so this run has two artifacts, and github-pages was the missing one:

    12:31:55.058  Artifact github-pages successfully finalized. Artifact ID 15021777988
    12:31:55.749  Deploy to GitHub Pages:        Found 1 artifact(s)   <- 0.69s after finalize
    12:31:56.642  Retry deploy to GitHub Pages:  Found 1 artifact(s)   <- 1.58s after finalize
    Error: No artifacts named "github-pages" were found for this workflow run.
    

    Both attempts failed. Waiting 60s before trying again, the listing holds it. We never probed between 1.6s and 60s, so all we can say is that the lag was above 1.6s and at or below 60s — not that it is sub-second.

    Worth noting for anyone reading their own logs: Found N artifact(s) is printed before the name filter, so Found 1 here is the unrelated artifact, not a count of github-pages.

    2. It is not always intermittent. It stayed on.

    Three consecutive deploys had the immediate attempt fail, after a deploy 1h34m earlier that found the artifact at once:

    10:58  first attempt  Found 2   succeeded immediately
    12:31  first attempt  Found 1   failed
    12:55  first attempt  Found 1   failed, succeeded 60s later
    13:51  first attempt  Found 1   failed, succeeded 60s later
    

    Since then, three deploys that wait 60s before the first attempt have all found 2 and succeeded on that attempt, with no retry. So for a stretch of hours the immediate attempt was failing deterministically rather than occasionally.

    3. An immediate retry reads the same stale listing.

    The two attempts in the first log above are 0.9s apart and fail identically. The action's error text suggests re-running later, and this thread is converging on retrying the deploy step (renovatebot/renovate#48395) — that works, but a retry with no delay between the attempts does not. Ours needed the delay, not the second attempt.

    4. Why checking the REST API does not work (answering the question above)

    getArtifactMetadata resolves the name through @actions/artifact:

    const twirpResponse = await artifactClient.listArtifacts()

    which is POST {ACTIONS_RESULTS_URL}/twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts. That is a different service from GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts, so an artifact being listed by the REST API says nothing about whether this lookup will find it. Polling REST probes the wrong listing, which is consistent with what you found.

    On #338, from this angle

    upload-pages-artifact v5 already exposes the id:

    outputs:
      artifact_id:
        value: ${{ steps.upload-artifact.outputs.artifact-id }}

    and createPagesDeployment already posts artifact_id. For the same-job case the listing exists only to turn a known name into an id the previous step just printed. An input to pass it through would remove this failure mode rather than time it — and the sleep everyone is adding would not be needed.

    Our workaround meanwhile is a plain sleep 60 before the first attempt rather than between attempts, so a successful deploy's log carries no ##[error]. A minute is margin, not a measurement; we cannot narrow the lag from these logs.

  8. mcanouil commented on Nov 25, 2026

    @mcanouil

    It would be great to have some traction on the issue. I'm hitting the issue nearly all the time now and have to retry the deploy because of this race condition.
    Counting the number of PRs made on other repositories (several hundreds) mentioning this issue, this is something worth tackling sooner than later in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions