File tree Expand file tree Collapse file tree 2 files changed +30
-50
lines changed
Expand file tree Collapse file tree 2 files changed +30
-50
lines changed Original file line number Diff line number Diff line change 1- name : build
1+ name : CI
22
33on :
44 pull_request :
55 branches :
66 - main
7+ push :
8+ branches :
9+ - main
710
811jobs :
912 build :
1013 name : build
1114 runs-on : ubuntu-latest
1215 steps :
13- - name : Checkout
16+ - name : checkout
1417 uses : actions/checkout@v4
1518
16- - name : Setup Node
19+ - name : setup Node
1720 uses : actions/setup-node@v4
1821 with :
1922 node-version : ' lts/*'
2023
21- - name : Install dependencies
24+ - name : install dependencies
2225 run : npm ci
2326
24- - name : Build VitePress site
27+ - name : build
2528 run : npx vitepress build
29+
30+ - name : upload build artifact
31+ if : github.event_name == 'push'
32+ uses : actions/upload-pages-artifact@v3
33+ with :
34+ path : .vitepress/dist
35+
36+ deploy :
37+ name : deploy
38+ if : github.event_name == 'push'
39+ runs-on : ubuntu-latest
40+ needs : build
41+ permissions :
42+ pages : write
43+ id-token : write
44+ environment :
45+ name : github-pages
46+ url : ${{ steps.deployment.outputs.page_url }}
47+ steps :
48+ - name : deploy
49+ id : deployment
50+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments