Skip to content

Deploy docs via Pages artifact instead of gh-pages branch#832

Merged
mike-thompson-day8 merged 1 commit intomasterfrom
fix-831-pages-deploy
Apr 10, 2026
Merged

Deploy docs via Pages artifact instead of gh-pages branch#832
mike-thompson-day8 merged 1 commit intomasterfrom
fix-831-pages-deploy

Conversation

@mike-thompson-day8
Copy link
Copy Markdown
Contributor

Summary

Closes #831.

The current docs workflow commits the entire built MkDocs site to the
gh-pages branch on every push to master. Over time this has accumulated
~100 MB of generated artifacts in gh-pages (js/docs.js at 1.8 MB ×
626 versions, klipse_plugin.js at 7.6 MB, re-frame-docs-app.tar.xz,
etc.) — and every git clone has to download all of it.

This PR switches the third job of docs-workflow.yml from "commit the
built site to gh-pages" to the modern artifact-based
actions/deploy-pages flow. The site is served directly from an
ephemeral workflow artifact, nothing is committed to git, and the
gh-pages branch is no longer needed.

The first two jobs (re-frame-docs-app, mkdocs) are unchanged.

Required follow-up steps (after this merges)

  1. Settings → Pages: change the source from "Deploy from a branch"
    (gh-pages) to "GitHub Actions". This must happen before the new
    workflow runs successfully — otherwise the deploy-pages step will
    fail and the site will keep serving stale content from gh-pages.
  2. After the first successful Actions-based deployment is verified at
    https://day8.github.io/re-frame/, delete the gh-pages branch:
    git push origin --delete gh-pages
  3. Wait 24–72h for GitHub's GC to repack the remote, after which a fresh
    clone should drop from ~100 MB to ~5 MB.

Notes

  • The new actions are pinned to commit SHAs, matching the convention
    introduced in Pin GitHub Actions to commit SHAs #830.
  • Job-level permissions are scoped only to the new github-pages job
    (pages: write, id-token: write) so the existing
    re-frame-docs-app and mkdocs jobs are not affected.
  • A top-level concurrency: pages block is added to prevent
    overlapping Pages deployments without cancelling in-flight runs.
  • The workflow file now carries a PREREQUISITE header comment so
    future maintainers reading the diff understand the Pages source must
    be set to "GitHub Actions".

Test plan

  • Repository owner changes Pages source to "GitHub Actions"
  • Workflow runs successfully on merge to master
  • https://day8.github.io/re-frame/ loads correctly
  • Navigation, search, and the ClojureScript docs app render
  • gh-pages branch deleted; clone size verified to drop after GC

The current docs workflow commits the entire built MkDocs site to the
gh-pages branch on every push to master. Over time this has accumulated
~100 MB of generated artifacts (js/docs.js, klipse_plugin.js, etc.) in
the gh-pages branch, which every git clone has to download.

Switch to the artifact-based actions/deploy-pages flow so the site is
served from an ephemeral workflow artifact and nothing is committed to
git. Once the new deployment is verified the gh-pages branch can be
deleted, reducing clone size from ~100 MB to ~5 MB.

Refs #831
@mike-thompson-day8 mike-thompson-day8 merged commit 2fc92d3 into master Apr 10, 2026
1 check passed
@mike-thompson-day8 mike-thompson-day8 deleted the fix-831-pages-deploy branch April 10, 2026 04:12
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.

[Enhancement]: Git repo is 100MB

1 participant