Skip to content

ci: build and deploy docs only on push to main - #322

Merged
fsamier merged 1 commit into
mainfrom
ci/deploy-docs
Aug 6, 2026
Merged

ci: build and deploy docs only on push to main#322
fsamier merged 1 commit into
mainfrom
ci/deploy-docs

Conversation

@fsamier

@fsamier fsamier commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the deploy docs job that was timing out on main (the Pages deployment stayed stuck in deployment_queued and eventually failed after 10 minutes).

Changes

  • Build docs on every PR (in the ci job) to catch build errors early, without uploading any artifact.
  • Made deploy-docs a self-contained job that builds and deploys docs, gated on github.event_name == 'push' && github.ref == 'refs/heads/main'.
  • Declared the github-pages environment on the deploy job, which actions/deploy-pages requires. Without it the deployment never resolves and times out — the root cause of the failure.

Result

Docs are built on every PR to anticipate errors, and built + deployed to GitHub Pages only on push to main, where the Pages deploy step now resolves correctly instead of hanging.

@fsamier
fsamier requested a review from a team as a code owner August 6, 2026 13:24
@github-actions github-actions Bot added the ci label Aug 6, 2026
@fsamier

fsamier commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Updated: docs are now built on every PR push (no artifact upload) to catch build errors early, while build + deploy to GitHub Pages still runs only on push to main.

@fsamier

fsamier commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Refactored: the deploy step now lives inside the main ci job and only runs on push to main (via an if condition). The separate deploy-docs job was removed.

@fsamier

fsamier commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Reverted to the two-job implementation: docs are built on every PR in ci, and a separate deploy-docs job builds + deploys to GitHub Pages only on push to main.

@fsamier
fsamier merged commit d77a31a into main Aug 6, 2026
12 checks passed
@fsamier
fsamier deleted the ci/deploy-docs branch August 6, 2026 13:32
@fsamier fsamier changed the title Build and deploy docs only on push to main ci: build and deploy docs only on push to main Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant