fix: make docs layout mobile-friendly + add GitHub Pages PR preview via gh-pages branch#3
Conversation
Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/46c2a75b-cc5d-4b89-a731-4a488048d319 Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
|
@copilot I want to preview this live. Help me set this up for GitHub pages. |
Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/6ce6921c-75ab-4f61-9e12-40e62516daf2 Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Done in commit
Once the workflow runs you'll see the preview link appear here in the PR. |
|
@copilot pr releases should be placed under a pr directory and versioned by build id. They should be cleaned up after the pr is merged to main. Old builds should be cleaned up if they are 2 days old. |
…anup Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/c0a6a67d-9b51-4378-af44-6760d7e1cbca Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Done in commit Per-PR versioned previews The PR comment is updated on every push with the latest build's URL. Cleanup on PR close ( Daily stale-build cleanup ( One-time manual step required — in the repository's Settings → Pages, switch the source from GitHub Actions to Deploy from a branch → |
|
🚀 PR Preview deployed! Build ID: |
|
@copilot got a 404 page |
Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/5762d04a-eea8-4426-8321-a477f59a46fd Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Fixed in commit The workflow now calls the GitHub Pages API automatically after each deploy to switch the source to |
|
@copilot i ran the workflow. What's my url? |
Your latest preview is live at: https://wintermuted.github.io/ui-theme/pr-3/25340230343/showcase/ (Run ID Each time you push to this PR a new versioned URL is generated and the comment on the PR is updated with the latest link. |
…ca11-f310-4530-ac68-169984cd87e6 Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Improves the showcase docs experience by adding mobile-responsive layout tweaks and introducing GitHub Pages-based deployments that support per-PR preview URLs (with automated cleanup), enabling easier review of docs changes in PRs.
Changes:
- Add small-screen CSS breakpoints to reduce topbar/shell spacing and improve readability on phones.
- Add a GitHub Actions workflow that deploys the showcase to
gh-pages, including per-PR preview subdirectories and a PR comment with the preview link. - Add a cleanup workflow to remove PR preview directories on PR close and prune stale preview builds on a schedule.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
showcase/showcase.css |
Adds mobile breakpoints to tighten the docs layout and topbar on small screens. |
package-lock.json |
Introduces a lockfile (currently minimal, reflecting no dependencies). |
.github/workflows/deploy-showcase-pages.yml |
Implements gh-pages branch management, main deploys, PR preview deploys, and PR preview comments. |
.github/workflows/cleanup-pr-previews.yml |
Adds PR-close + scheduled cleanup of preview directories/builds on gh-pages. |
| /* Keep only the brand icon — hide the text label */ | ||
| .docs-topbar-brand span { | ||
| display: none; |
| # The Pages source is configured automatically via the GitHub API — | ||
| # no manual Settings → Pages configuration is required. |
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "showcase/**" | ||
| - "styles/**" | ||
| - "index.css" | ||
| - ".github/workflows/deploy-showcase-pages.yml" |
| on: | ||
| # Remove a PR's entire preview directory when the PR is closed/merged | ||
| pull_request: | ||
| types: [closed] |
| # NOTE: Uses GNU date (+%s and -d @<epoch>) which is available on all | ||
| # ubuntu-latest GitHub Actions runners. |
|
@copilot just replace it each time for now. We fix figure out how to patch deploy later. |
…up workflow Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/68aec44a-ff9f-4686-9d4e-30481d4839c5 Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Done in commit |
|
@copilot post a comment with new build url each time. |
Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/b792c654-5e47-424b-8882-bbff5efa438f Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Done in commit |
|
@copilot resolve conflicts |
…iendly-layout # Conflicts: # package-lock.json Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Done in commit |
|
@copilot you didn't post a link from the latest run. This should be driven automatically via actions. |
… runs on PR pushes Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/f3617a83-443b-4453-9661-7fe21b1f473a Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Fixed in commit |
|
@copilot No link still. Commit to trigger the build and the link |
…-replace deploy Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/b87d15c1-4d42-4493-88bb-f30ed3840acf Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Fixed in commit |
|
🚀 PR Preview deployed!
Run |
showcase.cssdeploy-showcase-pages.ymlworkflow with gh-pages branch managementgh-pagesbranch via API after each deploycleanup-pr-previews.ymlpathsfilter frompull_requesttrigger so the workflow fires on every PR push--forcepush to gh-pages to prevent non-fast-forward rejection on full-replace deploys