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