File tree Expand file tree Collapse file tree 1 file changed +29
-12
lines changed Expand file tree Collapse file tree 1 file changed +29
-12
lines changed Original file line number Diff line number Diff line change @@ -2,36 +2,53 @@ name: Deploy to GitHub Pages
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
5
+ branches : [main]
6
6
7
7
permissions :
8
8
contents : read
9
9
pages : write
10
10
id-token : write
11
11
12
+ concurrency :
13
+ group : " pages"
14
+ cancel-in-progress : false
15
+
12
16
jobs :
13
- build-and-deploy :
17
+ build :
14
18
runs-on : ubuntu-latest
15
-
19
+
16
20
steps :
17
21
- name : Checkout
18
22
uses : actions/checkout@v4
19
-
23
+
20
24
- name : Setup Node.js
21
25
uses : actions/setup-node@v4
22
26
with :
23
27
node-version : ' 20'
24
28
cache : ' npm'
25
-
29
+
26
30
- name : Install dependencies
27
31
run : npm ci
28
-
32
+
29
33
- name : Build
30
34
run : npm run build
31
-
32
- - name : Deploy to GitHub Pages
33
- if : github.ref == 'refs/heads/main'
34
- uses : peaceiris/actions-gh-pages@v3
35
+
36
+ - name : Setup Pages
37
+ uses : actions/configure-pages@v4
38
+
39
+ - name : Upload artifact
40
+ uses : actions/upload-pages-artifact@v3
35
41
with :
36
- github_token : ${{ secrets.GITHUB_TOKEN }}
37
- publish_dir : ./demo
42
+ path : ' ./demo'
43
+
44
+ deploy :
45
+ environment :
46
+ name : github-pages
47
+ url : ${{ steps.deployment.outputs.page_url }}
48
+ runs-on : ubuntu-latest
49
+ needs : build
50
+
51
+ steps :
52
+ - name : Deploy to GitHub Pages
53
+ id : deployment
54
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments