fix(ci): write CNAME into docs/ so Pages keeps the custom domain#71
Merged
Conversation
GitHub Pages publishes from gh-pages:/docs on this repo, but the deploy workflows only placed CNAME at the branch root. Each deploy overwrote docs/ with the freshly built site (which contains no CNAME), so Pages saw a published folder without CNAME and reset the custom domain in settings on every run. Write mcp.idfkit.com into docs/CNAME in both the main deploy and PR preview workflows, in addition to the root CNAME. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Docs preview for this PR is available at: |
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.
Summary
gh-pages:/docs(confirmed by the PR preview URLmcp.idfkit.com/pr-preview/pr-N/mapping togh-pages-deploy/docs/pr-preview/pr-N/).CNAMEat the branch root. The build step then overwrotedocs/with the freshly built site, which contains no CNAME — so Pages saw a published folder without CNAME and cleared the custom domain on every run.mcp.idfkit.comtodocs/CNAMEin bothdeploy-docs.yml(main deploy) anddeploy-pr-docs.yml(PR previews), alongside the existing root CNAME.Why not switch to
peaceiris/actions-gh-pages?The sibling repo
idfkit/idfkitdoesn't have this problem because it usespeaceiris/actions-gh-pages@v4withcname: py.idfkit.com, which writes CNAME into the published folder automatically. Keeping the custom script here but fixing the CNAME placement is the smallest change.Follow-up
After this merges, re-set the custom domain to
mcp.idfkit.comonce in Settings → Pages. Subsequent deploys will preserve it.Test plan
mcp.idfkit.comsurvives the nextdeploy-docsrun.🤖 Generated with Claude Code