fix(ci): remove CNAME from website PR preview build#1999
Merged
Conversation
The CNAME file causes PR preview deployments to redirect to the production domain. Remove it before deploying the preview so each PR gets its own accessible URL.
Contributor
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the GitHub Pages PR preview deployment by removing the CNAME file from the built preview output so the preview URL doesn’t redirect to the production domain.
Changes:
- Adds a workflow step to delete
./website/build/CNAMEfor non-closed PR events before deploying the PR preview.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merged
azu
added a commit
that referenced
this pull request
Apr 26, 2026
<!-- Release notes generated using configuration in .github/release.yml at master --> ## What's Changed ### Features * feat(markdown-to-ast): add support for TOML and JSON frontmatter by @3w36zj6 in #2012 ### CI * fix(ci): remove CNAME from website PR preview build by @azu in #1999 * chore(deps): update github/codeql-action action to v3.35.2 by @renovate[bot] in #2010 * Update merge-gatekeeper action and add actions permission by @azu in #2014 ### Dependency Updates * chore(deps): update docusaurus monorepo to ^3.10.0 (minor) by @renovate[bot] in #2000 * chore(deps): update dependency oxlint to ^1.59.0 by @renovate[bot] in #2002 * chore(deps): update patch updates (patch) by @renovate[bot] in #2001 * chore(deps): update dependency oxlint-tsgolint to ^0.20.0 by @renovate[bot] in #2004 * chore(deps): update dependency json5 to ^2.2.3 by @renovate[bot] in #2003 * chore(deps): update react monorepo to ^19.2.5 (patch) by @renovate[bot] in #2005 * chore(deps): update dependency oxlint-tsgolint to ^0.21.0 by @renovate[bot] in #2007 * chore(deps): update dependency oxlint-tsgolint to ^0.21.1 by @renovate[bot] in #2009 * chore(deps): update pnpm to v10.33.1 by @renovate[bot] in #2011 * chore(deps): update pnpm to v10.33.2 by @renovate[bot] in #2013 ### Other Changes * fix(website): move onBrokenMarkdownLinks into markdown.hooks by @azu in #1998 **Full Changelog**: v15.5.4...v15.6.0 Co-authored-by: azu <azu@users.noreply.github.com>
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
The website PR preview deployment currently includes the
CNAMEfile from the built website, which causes the preview URL to redirect to the production domain (textlint.org) instead of serving the preview. This PR removesCNAMEfrom./website/buildbefore thepr-preview-actiondeploys, so the preview URL works as expected.Changes
.github/workflows/website-preview.ymlthat runsrm -f ./website/build/CNAMEwhen the workflow is not triggered by a PR close event.Breaking Changes
None.
Test Plan
website-previewworkflow succeeds.https://textlint.github.io/textlint/pr-preview/pr-<number>/) and verify it serves the preview site instead of redirecting to textlint.org.