Publish with the git-pages action instead of pushing a pages branch #2

Merged
jingus merged 1 commit from t3/use-git-pages-action-in-deploy into main 2026-11-07 02:59:25 -06:00
Owner

Why

The deploy workflow successfully built the site and pushed it to the pages
branch, but that never reached the live site:

  • git-pages is request-driven. Neither star/pages nor the star org has a
    webhook, and the workflow itself never called git-pages, so no publish
    request was ever made (pages: POST/PUT is absent from the git-pages log).
  • Even with a webhook this arrangement would not work at the root URL:
    star.pages.jingus.dev/ is configured with index-repo-branch = "main",
    so a push to pages is rejected by the ref allowlist. Publishing main
    would upload the Astro sources instead of the built site, and targeting
    /pages/ would move the site off /.

What

Replace the "push the built output to the pages branch" step with the same
archive-upload pattern jingus/pages already uses successfully:

  • build into _site/ via nix build --no-link --print-out-paths .#site
  • publish with actions/git-pages@v2.2.0 to https://star.pages.jingus.dev/
    (server: pages.jingus.dev to bootstrap over the apex cert, automatic
    forgejo.token, source: _site/)

The contents: write permission is dropped because the workflow no longer
pushes to the repository. The action reference resolves through
data.forgejo.org/actions/git-pages, as it does in jingus/pages.
star.pages.jingus.dev/ maps to star/pages, so the automatic token is
sufficient for forge-auth.

Also update the README's deploy/layout notes so they no longer describe the
pages branch convention.

Verification

  • git-pages-cli --upload-dir ... --dry-run against the live server returns
    dry-run ok (server-side forge-auth path).
  • A dry-run publish to http://star.pages.jingus.dev/ confirmed the root site
    accepts a main ref and that the old pages ref push is rejected by the
    allowlist.

After merge

The next push to main (or a manual workflow_dispatch) will perform the
first real git-pages upload, creating the manifest for
star.pages.jingus.dev.

## Why The deploy workflow successfully built the site and pushed it to the `pages` branch, but that never reached the live site: - git-pages is request-driven. Neither `star/pages` nor the `star` org has a webhook, and the workflow itself never called git-pages, so no publish request was ever made (`pages: POST/PUT` is absent from the git-pages log). - Even with a webhook this arrangement would not work at the root URL: `star.pages.jingus.dev/` is configured with `index-repo-branch = "main"`, so a push to `pages` is rejected by the ref allowlist. Publishing `main` would upload the Astro sources instead of the built site, and targeting `/pages/` would move the site off `/`. ## What Replace the "push the built output to the `pages` branch" step with the same archive-upload pattern `jingus/pages` already uses successfully: - build into `_site/` via `nix build --no-link --print-out-paths .#site` - publish with `actions/git-pages@v2.2.0` to `https://star.pages.jingus.dev/` (`server: pages.jingus.dev` to bootstrap over the apex cert, automatic `forgejo.token`, `source: _site/`) The `contents: write` permission is dropped because the workflow no longer pushes to the repository. The action reference resolves through `data.forgejo.org/actions/git-pages`, as it does in `jingus/pages`. `star.pages.jingus.dev/` maps to `star/pages`, so the automatic token is sufficient for forge-auth. Also update the README's deploy/layout notes so they no longer describe the `pages` branch convention. ## Verification - `git-pages-cli --upload-dir ... --dry-run` against the live server returns `dry-run ok` (server-side forge-auth path). - A dry-run publish to `http://star.pages.jingus.dev/` confirmed the root site accepts a `main` ref and that the old `pages` ref push is rejected by the allowlist. ## After merge The next push to `main` (or a manual `workflow_dispatch`) will perform the first real git-pages upload, creating the manifest for `star.pages.jingus.dev`.
jingus merged commit 1a91deea0b into main 2026-11-07 02:59:25 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
star/pages!2
No description provided.