We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2685fce commit 9e96b39Copy full SHA for 9e96b39
.github/workflows/build-and-preview-site.yml
@@ -74,6 +74,18 @@ jobs:
74
echo "Warning: Neither public nor public-dir found after extraction"
75
fi
76
77
+ - name: Remove CNAME from preview build
78
+ if: github.event_name == 'pull_request_target'
79
+ run: |
80
+ # Remove CNAME from the built site to prevent DNS redirect to badges.layer5.io
81
+ # This ensures PR previews use the default GitHub Pages domain
82
+ if [ -f public/CNAME ]; then
83
+ rm public/CNAME
84
+ echo "CNAME removed from preview build to prevent DNS redirect"
85
+ else
86
+ echo "No CNAME file found in public directory"
87
+ fi
88
+
89
- name: Deploy Preview
90
if: github.event_name == 'pull_request_target' && github.event.action != 'closed'
91
uses: rossjrw/pr-preview-action@v1.6.3
0 commit comments