fix gh actions for new subdomain#20
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the site’s GitHub Pages deployment configuration to serve from the new custom domain (skills.stellar.org) while keeping PR previews working under /pr/<N>/.
Changes:
- Pin
SITE_ORIGINdefaults in CI tohttps://skills.stellar.organd simplify previewNEXT_BASE_PATHto/pr/<N>. - Add
site/public/CNAMEfor the custom domain and remove the olddocs/CNAME. - Update deployment documentation/comments to reflect the new domain and preview URLs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
site/src/app/sitemap.ts |
Comment updates describing SITE_ORIGIN expectations. |
site/src/app/layout.tsx |
Comment updates clarifying canonical/metadataBase behavior with apex-origin SITE_ORIGIN. |
site/README.md |
Updates deployment docs and environment variable descriptions for the new domain. |
site/public/CNAME |
Adds GitHub Pages custom domain file (skills.stellar.org). |
site/next.config.js |
Comment updates describing main vs preview basePath behavior. |
site/CLAUDE.md |
Updates deployment notes for custom domain + PR preview paths. |
site/.env.example |
Updates env var comments to match new deployment model. |
docs/CNAME |
Removes prior custom domain file from the old location. |
.github/workflows/preview-pr.yml |
Pins default SITE_ORIGIN to the new domain; simplifies NEXT_BASE_PATH for previews. |
.github/workflows/deploy-pages.yml |
Pins default SITE_ORIGIN to the new domain; removes main build basePath resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
39
to
43
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| env: | ||
| SITE_ORIGIN: ${{ vars.SITE_ORIGIN || format('https://{0}.github.io/{1}', github.repository_owner, github.event.repository.name) }} | ||
| SITE_ORIGIN: ${{ vars.SITE_ORIGIN || 'https://skills.stellar.org' }} | ||
| steps: |
Comment on lines
48
to
52
| env: | ||
| # Production origin (same as main) — see header comment. | ||
| SITE_ORIGIN: ${{ vars.SITE_ORIGIN || format('https://{0}.github.io/{1}', github.repository_owner, github.event.repository.name) }} | ||
| SITE_ORIGIN: ${{ vars.SITE_ORIGIN || 'https://skills.stellar.org' }} | ||
| IS_PREVIEW: "true" | ||
| # PR head SHA so card "view source" links resolve for newly-added |
Comment on lines
+91
to
+100
| 3. **Custom domain:** `site/public/CNAME` ships | ||
| `skills.stellar.org`, so every build republishes it to the | ||
| `gh-pages` root. Set the same domain under **Settings → Pages → | ||
| Custom domain** and point DNS at GitHub Pages (`A` records for the | ||
| apex or a `CNAME` for a subdomain). | ||
|
|
||
| URLs once Pages is live: | ||
|
|
||
| - Main: `https://<owner>.github.io/<repo>/` | ||
| - PR-N: `https://<owner>.github.io/<repo>/pr/<N>/` | ||
|
|
||
| ### Switching to a custom domain later | ||
|
|
||
| Both workflows derive `SITE_ORIGIN` and the base path from repo | ||
| metadata by default. To cut over to a custom apex domain, set one | ||
| repo variable in **Settings → Secrets and variables → Actions → | ||
| Variables**: | ||
|
|
||
| - `SITE_ORIGIN` = `https://<your-domain>` | ||
|
|
||
| When `SITE_ORIGIN` is set, both workflows drop the GitHub-Pages | ||
| project subpath so assets resolve from the root of the custom | ||
| domain. | ||
|
|
||
| Then: | ||
|
|
||
| 1. Add `public/CNAME` with one line: your apex domain. | ||
| 2. In repo Settings → Pages, set the custom domain. | ||
| 3. Point DNS at GitHub Pages (`A` records for the apex or a `CNAME` | ||
| for a subdomain). | ||
|
|
||
| No workflow edits needed; both workflows read the same variable, so | ||
| main and previews stay in lockstep. | ||
| To redeploy a fork at a different origin, set the repo variable | ||
| `SITE_ORIGIN` under **Settings → Secrets and variables → Actions → | ||
| Variables** (apex URL, no trailing slash). The override is read by | ||
| both workflows, so main and previews stay in lockstep. |
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.
this will fix the build css for skills.stellar.org