File tree Expand file tree Collapse file tree 3 files changed +80
-2
lines changed
Expand file tree Collapse file tree 3 files changed +80
-2
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 : [ main ]
6+ pull_request :
7+ branches : [ main ]
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+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Setup Bun
27+ uses : oven-sh/setup-bun@v1
28+ with :
29+ bun-version : latest
30+
31+ - name : Install dependencies
32+ run : bun install
33+
34+ - name : Build for GitHub Pages
35+ run : |
36+ bun run ng build --configuration=github-pages
37+ # Create 404.html for SPA routing
38+ cp dist/gentle-learning-pages/browser/index.html dist/gentle-learning-pages/browser/404.html
39+
40+ - name : Setup Pages
41+ uses : actions/configure-pages@v4
42+
43+ - name : Upload artifact
44+ uses : actions/upload-pages-artifact@v3
45+ with :
46+ path : ' ./dist/gentle-learning-pages/browser'
47+
48+ deploy :
49+ environment :
50+ name : github-pages
51+ url : ${{ steps.deployment.outputs.page_url }}
52+ runs-on : ubuntu-latest
53+ needs : build
54+ steps :
55+ - name : Deploy to GitHub Pages
56+ id : deployment
57+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 4646 },
4747 {
4848 "type" : " anyComponentStyle" ,
49- "maximumWarning" : " 4kB" ,
50- "maximumError" : " 8kB"
49+ "maximumWarning" : " 8kB" ,
50+ "maximumError" : " 12kB"
51+ }
52+ ],
53+ "outputHashing" : " all"
54+ },
55+ "github-pages" : {
56+ "baseHref" : " /Gentle-Learning/" ,
57+ "outputPath" : " dist/gentle-learning-pages" ,
58+ "outputMode" : " static" ,
59+ "prerender" : false ,
60+ "ssr" : false ,
61+ "budgets" : [
62+ {
63+ "type" : " initial" ,
64+ "maximumWarning" : " 500kB" ,
65+ "maximumError" : " 1MB"
66+ },
67+ {
68+ "type" : " anyComponentStyle" ,
69+ "maximumWarning" : " 8kB" ,
70+ "maximumError" : " 12kB"
5171 }
5272 ],
5373 "outputHashing" : " all"
Original file line number Diff line number Diff line change 55 "ng" : " ng" ,
66 "start" : " ng serve" ,
77 "build" : " ng build" ,
8+ "build:github-pages" : " ng build --configuration=github-pages" ,
89 "watch" : " ng build --watch --configuration development" ,
910 "test" : " ng test" ,
1011 "lint" : " ng lint" ,
You can’t perform that action at this time.
0 commit comments