File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : false
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+
25+ - name : Setup Node.js
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : ' 20'
29+ cache : ' npm'
30+
31+ - name : Install dependencies
32+ run : npm install
33+
34+ - name : Build
35+ run : npm run build
36+
37+ - name : Setup Pages
38+ uses : actions/configure-pages@v5
39+
40+ - name : Upload artifact
41+ uses : actions/upload-pages-artifact@v3
42+ with :
43+ path : ' ./dist'
44+
45+ deploy :
46+ environment :
47+ name : github-pages
48+ url : ${{ steps.deployment.outputs.page_url }}
49+ runs-on : ubuntu-latest
50+ needs : build
51+ steps :
52+ - name : Deploy to GitHub Pages
53+ id : deployment
54+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -17,6 +17,28 @@ npm run build # Build the project
1717npm run preview # Preview the production build
1818```
1919
20+ ## Deployment
21+
22+ This project is configured to automatically deploy to GitHub Pages when changes are pushed to the ` main ` branch.
23+
24+ ### Setup Instructions
25+
26+ To enable GitHub Pages deployment:
27+
28+ 1 . Go to your repository ** Settings** → ** Pages**
29+ 2 . Under ** Source** , select ** GitHub Actions**
30+ 3 . The workflow will automatically run on every push to the ` main ` branch
31+
32+ The site will be available at: ` https://<username>.github.io/<repository-name>/ `
33+
34+ ### Manual Deployment
35+
36+ You can also trigger a deployment manually:
37+
38+ 1 . Go to ** Actions** tab in your repository
39+ 2 . Select the ** Deploy to GitHub Pages** workflow
40+ 3 . Click ** Run workflow**
41+
2042## Author
2143
2244** FzuHelper Website** © [ Baoshuo] ( https://github.com/renbaoshuo ) .<br >
You can’t perform that action at this time.
0 commit comments