File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,10 +3,8 @@ name: CI - Prerelease Deploy
33on :
44 push :
55 branches : [ main ]
6- branches-ignore : [ gh-pages ]
76 pull_request :
87 branches : [ main ]
9- branches-ignore : [ gh-pages ]
108 types : [ closed ]
119
1210permissions :
Original file line number Diff line number Diff line change 1+ name : Deploy Astro Starlight to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ # Also allow manual deployment
8+ workflow_dispatch :
9+
10+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+ permissions :
12+ contents : read
13+ pages : write
14+ id-token : write
15+
16+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+ concurrency :
19+ group : " pages"
20+ cancel-in-progress : false
21+
22+ jobs :
23+ build :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - name : Checkout repository
27+ uses : actions/checkout@v4
28+
29+ - name : Setup Node.js
30+ uses : actions/setup-node@v4
31+ with :
32+ node-version : ' 18'
33+ cache : ' npm'
34+ cache-dependency-path : page/package-lock.json
35+
36+ - name : Setup Pages
37+ id : pages
38+ uses : actions/configure-pages@v4
39+
40+ - name : Install dependencies
41+ run : npm ci
42+ working-directory : ./page
43+
44+ - name : Build Astro site
45+ run : npm run build
46+ working-directory : ./page
47+ env :
48+ # Use the configured base path from Pages setup
49+ # This ensures assets and links work correctly when deployed to a subdirectory
50+ PUBLIC_BASE_PATH : ${{ steps.pages.outputs.base_path }}
51+
52+ - name : Upload artifact
53+ uses : actions/upload-pages-artifact@v3
54+ with :
55+ path : ./page/dist
56+
57+ deploy :
58+ environment :
59+ name : github-pages
60+ url : ${{ steps.deployment.outputs.page_url }}
61+ runs-on : ubuntu-latest
62+ needs : build
63+ steps :
64+ - name : Deploy to GitHub Pages
65+ id : deployment
66+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments