Skip to content

fix(ci): remove CNAME from website PR preview build#1999

Merged
azu merged 1 commit into
masterfrom
fix/website-preview-remove-cname
Apr 9, 2026
Merged

fix(ci): remove CNAME from website PR preview build#1999
azu merged 1 commit into
masterfrom
fix/website-preview-remove-cname

Conversation

@azu

@azu azu commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

The website PR preview deployment currently includes the CNAME file from the built website, which causes the preview URL to redirect to the production domain (textlint.org) instead of serving the preview. This PR removes CNAME from ./website/build before the pr-preview-action deploys, so the preview URL works as expected.

Changes

  • Add a new "Remove CNAME from preview build" step in .github/workflows/website-preview.yml that runs rm -f ./website/build/CNAME when the workflow is not triggered by a PR close event.

Breaking Changes

None.

Test Plan

  • Open this PR and confirm the website-preview workflow succeeds.
  • Visit the PR preview URL (https://textlint.github.io/textlint/pr-preview/pr-<number>/) and verify it serves the preview site instead of redirecting to textlint.org.

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.
Copilot AI review requested due to automatic review settings April 9, 2026 12:50
@azu azu added the Type: CI Changes to CI configuration files and scripts label Apr 9, 2026
@azu azu enabled auto-merge (squash) April 9, 2026 12:51
@azu azu disabled auto-merge April 9, 2026 12:51
@azu azu enabled auto-merge (squash) April 9, 2026 12:52
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-04-09 12:57 UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/CNAME for non-closed PR events before deploying the PR preview.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@azu azu merged commit 18f8091 into master Apr 9, 2026
27 checks passed
@azu azu deleted the fix/website-preview-remove-cname branch April 9, 2026 12:56
@github-actions github-actions Bot mentioned this pull request Apr 26, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: CI Changes to CI configuration files and scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants