File tree Expand file tree Collapse file tree 1 file changed +35
-28
lines changed
Expand file tree Collapse file tree 1 file changed +35
-28
lines changed Original file line number Diff line number Diff line change 1- name : GitHub Actions
1+ name : Deploy to GitHub Pages
22
33on :
4- pull_request :
5- branches :
6- - main
74 push :
85 branches :
9- - main
6+ - main # Set this to your default branch
7+ permissions :
8+ id-token : write
9+ contents : read
10+ pages : write
1011
1112jobs :
1213 build :
1314 runs-on : ubuntu-latest
14- strategy :
15- matrix :
16- node-version :
17- - 18
18- - 20
19- - 22
15+
2016 steps :
21- - uses : actions/checkout@v4
22- - name : Use Node.js v${{ matrix.node-version }}
23- uses : actions/setup-node@v4
17+ - name : Checkout code
18+ uses : actions/checkout@v3
19+
20+ - name : Set up Node.js
21+ uses : actions/setup-node@v3
2422 with :
25- node-version : ${{ matrix.node-version }}
26- cache : npm
27- - run : npm ci
28- - run : npm run build
29- # - run: npm test
23+ node-version : ' 20.18.1' # Use the version of Node.js your project requires
24+
25+ - name : Install dependencies
26+ run : npm install
27+
28+ - name : Build Astro Starlight project
29+ run : npm run build
3030
31- check :
31+ - name : Verify build contents
32+ run : ls -R ./dist
33+
34+ - name : Upload build artifacts
35+ uses : actions/upload-pages-artifact@v3
36+ with :
37+ path : ./dist
38+
39+ deploy :
40+ needs : build
3241 runs-on : ubuntu-latest
42+ environment :
43+ name : github-pages
44+ url : ${{ steps.deploy.outputs.page_url }}
3345 steps :
34- - uses : actions/checkout@v4
35- - name : Use Node.js 22
36- uses : actions/setup-node@v4
37- with :
38- node-version : 22
39- cache : npm
40- - run : npm ci
41- - run : npm run check
46+ - name : Deploy to GitHub Pages
47+ id : deploy
48+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments