Skip to content

CI: retry the Pages deploy once when the artifact is not listed yet - #68

Merged
Gajesh2007 merged 1 commit into
mainfrom
ci/pages-retry
Nov 14, 2026
Merged

Gajesh2007 merged 1 commit into
mainfrom
ci/pages-retry

Conversation

@Gajesh2007

Copy link
Copy Markdown
Member

Problem

The hosted Pages job runs upload-pages-artifact and then deploy-pages in the same job. deploy-pages (v5.0.1) looks the github-pages artifact up in the run's artifact list (@actions/artifact listArtifacts, filtered by name) as soon as it starts. That list can lag the upload: failed runs log Found 1 artifact(s) 0.35–0.65 s after the upload finalized, and then No artifacts named "github-pages" were found even though the artifact exists. Successful runs log Found 2 at the same gap.

Observed on 2026-11-14 with no GitHub incident, now also on MLX main 68ccd6e (run 43567201794). Same change as merged Swift ml-explore#76, C #24 and LM ml-explore#421; MLX uses deploy-pages v4.0.5:

  • Swift LM main: runs 43534323268, 43535590050 and 43537424328 all failed this way.
  • Swift main: run 43534849562 failed once.
  • Upload and deploy have shared this job since 2026-09-14 without failing, so the lag is intermittent.

Change

  • The first deploy-pages try runs with continue-on-error.
  • Only if it failed before creating a deployment (no page_url, the listing-lag case), the job waits 20 seconds and runs the same pinned deploy-pages once more. A second failure fails the job as before.
  • The environment URL takes the output of whichever try succeeded.
  • No permission changes. The action pins, the protected github-pages environment and the native render job are unchanged.
  • FORKDIFF.md describes the retry.

Re-running a failed run is still no remedy, because the run then holds two github-pages artifacts and deploy-pages refuses them. That behaviour is unchanged; dispatch a fresh run on main instead.

Checks

  • actionlint passes.
  • The edit is identical in Layr-Labs/mlx-swift, mlx-c and mlx-swift-lm.
  • This workflow runs only on pushes to main and on manual dispatch, and the environment allows only main, so PR CI does not exercise it. It will be verified by the first main run after merge. The rollback is reverting this commit.

🤖 Generated with Claude Code

Same change as Swift ml-explore#76, C #24 and LM ml-explore#421, which MLX did not get: MLX main
68ccd6e's Pages deploy failed with "No artifacts named github-pages were
found" right after upload-pages-artifact finished in the same job
(deploy-pages lists the run's artifacts as soon as it starts, and that list
can lag the upload). Let the first try fail without failing the job; only
when it failed before it created a deployment (no page_url), wait 20
seconds and run the same pinned deploy-pages once more. A second failure
fails the job as before. No permission or pin changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gajesh2007
Gajesh2007 marked this pull request as ready for review November 14, 2026 07:05
@Gajesh2007
Gajesh2007 merged commit 3315f62 into main Nov 14, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant