Skip to content

Commit 71debbf

Browse files
authored
fix : GH pages test 4
1 parent f5aa8b8 commit 71debbf

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/deploy-to-gh-pages.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,15 @@ jobs:
4545

4646
- name: Ensure SPA deep-links work (copy index -> 404)
4747
run: |
48-
cp build/web/index.html build/web/404.html || true
49-
50-
# Option A: Always-run step that writes CNAME only if CUSTOM_DOMAIN secret exists
51-
- name: Add CNAME (optional)
52-
run: |
53-
if [ -n "${{ secrets.CUSTOM_DOMAIN }}" ]; then
54-
echo "Writing CNAME for domain: ${{ secrets.CUSTOM_DOMAIN }}"
55-
echo "${{ secrets.CUSTOM_DOMAIN }}" > build/web/CNAME
48+
if [ -f build/web/index.html ]; then
49+
cp build/web/index.html build/web/404.html || true
5650
else
57-
echo "CUSTOM_DOMAIN secret not set — skipping CNAME."
51+
echo "No build/web/index.html found — skipping copy."
5852
fi
5953
6054
- name: Deploy to GitHub Pages (gh-pages branch)
55+
uses: peaceiris/actions-gh-pages@v3
56+
with:
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
publish_dir: build/web
59+
publish_branch: gh-pages

0 commit comments

Comments
 (0)