Skip to content

Commit b105ec7

Browse files
committed
Add gh-pages deployment support and update GitHub Actions workflow
- Add "gh-pages" dependency to package.json for deployment to GitHub Pages. - Introduce "deploy" script in package.json to streamline deployment process. - Update GitHub Actions workflow to simplify deployment steps and remove unnecessary verification steps, enhancing clarity and efficiency.
1 parent ec726fb commit b105ec7

File tree

4 files changed

+624
-43
lines changed

4 files changed

+624
-43
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -34,47 +34,22 @@ jobs:
3434
- name: Build
3535
run: npm run build
3636

37-
- name: Verify build output
38-
run: |
39-
echo "Build output:"
40-
ls -la dist/
41-
echo "Assets:"
42-
ls -la dist/assets/ || echo "No assets folder"
43-
echo "Files in dist:"
44-
find dist -type f | head -20
45-
4637
- name: Copy 404.html for SPA routing
4738
run: cp dist/index.html dist/404.html
4839

49-
- name: Ensure CNAME is in dist
50-
run: |
51-
if [ -f public/CNAME ]; then
52-
cp public/CNAME dist/CNAME
53-
echo "CNAME copied to dist"
54-
fi
55-
if [ -f .nojekyll ]; then
56-
cp .nojekyll dist/.nojekyll || true
57-
echo ".nojekyll copied to dist"
58-
fi
59-
60-
- name: Setup Pages
61-
uses: actions/configure-pages@v4
62-
63-
- name: Upload artifact
64-
uses: actions/upload-pages-artifact@v3
65-
with:
66-
path: "./dist"
67-
68-
deploy:
69-
environment:
70-
name: github-pages
71-
url: ${{ steps.deployment.outputs.page_url }}
72-
runs-on: ubuntu-latest
73-
needs: build
74-
steps:
7540
- name: Deploy to GitHub Pages
76-
id: deployment
77-
uses: actions/deploy-pages@v4
41+
run: npm run deploy
42+
43+
# deploy:
44+
# environment:
45+
# name: github-pages
46+
# url: ${{ steps.deployment.outputs.page_url }}
47+
# runs-on: ubuntu-latest
48+
# needs: build
49+
# steps:
50+
# - name: Deploy to GitHub Pages
51+
# id: deployment
52+
# uses: actions/deploy-pages@v4
7853
# on:
7954
# push:
8055
# branches:

0 commit comments

Comments
 (0)