Skip to content

fix: enable GitHub Pages for pkgdown site - #2

Closed
bbuchsbaum wants to merge 1 commit into
mainfrom
cursor/fix-pkgdown-pages-enable-5a7c
Closed

bbuchsbaum wants to merge 1 commit into
mainfrom
cursor/fix-pkgdown-pages-enable-5a7c

Conversation

@bbuchsbaum

Copy link
Copy Markdown
Owner

Summary

The pkgdown workflow was building and deploying successfully to gh-pages, but GitHub Pages was never enabled (has_pages: false), so https://bbuchsbaum.github.io/templateflow/ returned a GitHub 404.

Fix

Smallest coherent change, matching sibling portfolio packages (neuroim2, bidser):

  • Grant pages: write on the pkgdown job
  • Add an Enable GitHub Pages step that POSTs {"source":{"branch":"gh-pages","path":"/"}} (idempotent via || true) before deploy

No package semantics, tests, or other CI gates were changed.

Evidence

  • Live URL before fix: HTTP 404 (“There isn't a GitHub Pages site here”)
  • Repo API: has_pages: false while gh-pages already contains a valid pkgdown index.html
  • Workflow YAML validated locally
  • After merge to main, the push-triggered pkgdown job should enable Pages and redeploy; the portfolio monitor should then see a live site

Remaining blocker

If org/repo Actions permissions disallow creating Pages via GITHUB_TOKEN even with pages: write, an admin must enable Pages once under Settings → Pages → Deploy from branch gh-pages / root. The workflow change is still the correct durable fix.

Open in Web Open in Cursor 

Site content already deploys to gh-pages, but Pages was never
enabled (has_pages=false), so the hosted URL 404s. Grant pages:write
and POST the Pages source so deploy can publish the live site.

Co-authored-by: bbuchsbaum <bbuchsbaum@users.noreply.github.com>
@bbuchsbaum

Copy link
Copy Markdown
Owner Author

Independent review: the pkgdown artifact and gh-pages branch were already valid; GitHub Pages itself was disabled. Pages has now been enabled directly from gh-pages:/, the deployment succeeded, and https://bbuchsbaum.github.io/templateflow/ returns HTTP 200. This workflow change is therefore unnecessary. In addition, || true would conceal authorization or API failures and could leave a green workflow with a broken site. Closing unmerged.

@bbuchsbaum bbuchsbaum closed this Aug 27, 2026
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.

2 participants