File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ concurrency :
14+ group : pages
15+ cancel-in-progress : true
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+
23+ - uses : actions/setup-node@v4
24+ with :
25+ node-version : 20
26+
27+ # Build the Starlight docs site
28+ - name : Install docs dependencies
29+ working-directory : docs
30+ run : npm ci
31+
32+ - name : Build docs
33+ working-directory : docs
34+ run : npm run build
35+
36+ # Combine website + docs into a single site
37+ # website/ → root (lightshell.sh/)
38+ # docs/ → /docs/ (lightshell.sh/docs/)
39+ - name : Assemble site
40+ run : |
41+ mkdir -p _site
42+ cp -r website/* _site/
43+ cp -r docs/dist/* _site/docs/ 2>/dev/null || mkdir -p _site/docs && cp -r docs/dist/* _site/docs/
44+
45+ - name : Upload Pages artifact
46+ uses : actions/upload-pages-artifact@v3
47+ with :
48+ path : _site
49+
50+ deploy :
51+ needs : build
52+ runs-on : ubuntu-latest
53+ environment :
54+ name : github-pages
55+ url : ${{ steps.deployment.outputs.page_url }}
56+ steps :
57+ - name : Deploy to GitHub Pages
58+ id : deployment
59+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import starlight from '@astrojs/starlight';
44
55// https://astro.build/config
66export default defineConfig ( {
7+ base : '/docs' ,
78 integrations : [
89 starlight ( {
910 title : 'LightShell Docs' ,
You can’t perform that action at this time.
0 commit comments