File tree Expand file tree Collapse file tree 2 files changed +59
-45
lines changed Expand file tree Collapse file tree 2 files changed +59
-45
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy (Pages Official)
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ contents : read # to checkout
10
+ pages : write # to deploy
11
+ id-token : write # to verify provenance
12
+
13
+ concurrency :
14
+ group : pages
15
+ cancel-in-progress : true
16
+
17
+ jobs :
18
+ build :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Checkout
22
+ uses : actions/checkout@v4
23
+
24
+ - name : Setup Node.js
25
+ uses : actions/setup-node@v4
26
+ with :
27
+ node-version : 18
28
+ cache : ' npm'
29
+ registry-url : ' https://registry.npmjs.org'
30
+
31
+ - name : Auth npm (optional)
32
+ run : |
33
+ if [ -n "${{ secrets.NPM_TOKEN }}" ]; then
34
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
35
+ fi
36
+
37
+ - name : Install deps
38
+ run : npm ci --prefer-offline
39
+ env :
40
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
41
+
42
+ - name : Build
43
+ run : npm run build
44
+
45
+ - name : Upload artifact
46
+ uses : actions/upload-pages-artifact@v3
47
+ with :
48
+ path : dist
49
+
50
+ deploy :
51
+ needs : build
52
+ environment :
53
+ name : github-pages
54
+ url : ${{ steps.deployment.outputs.page_url }}
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - name : Deploy to GitHub Pages
58
+ id : deployment
59
+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments