PR preview workflow: per-PR web URL + Windows/macOS builds (#77)#78
Merged
Conversation
#77) Mirrors the PR-preview workflow in petegordon/tandemonium and extends it with the desktop installers, so a PR can be tested fully and in isolation: - pr-preview.yml (pull_request open/sync/reopen/close, internal branches only): • Web overlay deployed to gh-pages pr-preview/pr-<N>/ via rossjrw/pr-preview-action (auto-teardown on close). • Windows .exe + macOS .dmg/zip published as a per-PR prerelease tagged pr-<N> (prerelease + not-latest so it never displaces the rolling landing-page release); deleted when the PR closes. • One sticky comment links the web URL and the desktop downloads. - deploy-pages.yml reworked to publish prod to the gh-pages branch root (peaceiris/actions-gh-pages, keep_files) so prod and the pr-preview/ umbrella share one Pages site; custom domain preserved via CNAME. gh-pages writes are serialized across both workflows via a shared concurrency group. Requires a one-time repo setting: Pages source = "Deploy from a branch" → gh-pages / (root). Documented in apps/overlay/README.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
🔎 PR #78 preview — torn downThis PR is closed; its web preview and desktop prerelease have been removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #77.
Mirrors the PR-preview workflow in
petegordon/tandemoniumand extends it with the desktop installers, so a PR can be tested fully and in isolation. Built per the decisions on #77: migrate Pages togh-pages, deliver desktop via per-PR prerelease, internal branches only.What a PR gets
One sticky comment linking:
gh-pagesunderhttps://lab.usersfirst.games/pr-preview/pr-<N>/overlay/viarossjrw/pr-preview-action..exe+ macOS.dmg/zip, published as a prerelease taggedpr-<N>(stable, clickable download URLs).Both are torn down on close: the web preview by the action, and the prerelease + tag by a cleanup job.
Files
.github/workflows/pr-preview.yml(new) —pull_request[opened, synchronize, reopened, closed]. Jobs:web-preview,build-macos,build-windows(reuse the provenbuild-desktop.ymlsteps),prerelease,comment, andcleanup. Every job is guarded onhead.repo == this repo(internal only — fork PRs get a read-only token and can't publish anyway)..github/workflows/deploy-pages.yml— reworked to publish prod to thegh-pagesbranch root (peaceiris/actions-gh-pages,keep_files: true) so prod and thepr-preview/umbrella coexist on one Pages site. Custom domain preserved via theCNAMEbuild-web.jsemits (+cname:). gh-pages writes serialized across both workflows via a sharedgh-pages-writeconcurrency group.apps/overlay/README.md— documents the preview flow and the one-time setting.This switches the Pages source from "GitHub Actions" to a branch. After merging:
Settings → Pages → Build and deployment → Source = "Deploy from a branch" → Branch =
gh-pages/(root).Until that's flipped, the new
deploy-pages.ymlwill publish togh-pagesbut the live site won't serve from it. The custom domain (lab.usersfirst.games) carries over via CNAME. Recommend merging this when you can flip the setting right after (firstdeploy-pagesrun after merge creates thegh-pagesbranch).Notes / tradeoffs
prerelease: true+make_latest: false, so they never displace the rollingwebhid-overlay-latestrelease the landing page tracks.keep_files: trueon the prod deploy means files removed from prod aren't pruned fromgh-pages— chosen so a prod deploy never wipes in-flightpr-preview/dirs. Acceptable; can revisit.pull_request_targetwith untrusted build code is unsafe).main/ on PRs against the merged definition). YAML validated locally.🤖 Generated with Claude Code
https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
Generated by Claude Code