File tree Expand file tree Collapse file tree 1 file changed +36
-7
lines changed Expand file tree Collapse file tree 1 file changed +36
-7
lines changed Original file line number Diff line number Diff line change 9
9
workflow_dispatch :
10
10
11
11
jobs :
12
- build-and-deploy :
13
- runs-on : ubuntu-24.04
12
+ build :
13
+ runs-on : ubuntu-latest
14
14
permissions :
15
- contents : write
15
+ contents : read
16
16
17
17
steps :
18
18
- name : Checkout
19
- uses : actions/checkout@v3
19
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
20
21
21
- name : Setup Node.js
22
- uses : actions/setup-node@v3
22
+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
23
+ with :
24
+ node-version : ' 22.x'
25
+
26
+ - name : Cache node modules
27
+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
23
28
with :
24
- node-version : ' 18'
29
+ path : node_modules
30
+ key : node_modules-${{hashFiles('package-lock.json')}}
31
+ restore-keys : |
32
+ node_modules-
25
33
26
34
- name : Install dependencies
27
35
run : npm ci
28
36
29
37
- name : Build
30
38
run : npm run build
39
+
40
+ - name : Upload build
41
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
42
+ with :
43
+ name : out
44
+ path : ./out
45
+ if-no-files-found : error
46
+ retention-days : 1
47
+
48
+ deploy :
49
+ needs : build
50
+ runs-on : ubuntu-latest
51
+ permissions :
52
+ contents : write
53
+
54
+ steps :
55
+ - name : Download build from previous job
56
+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
57
+ with :
58
+ name : out
59
+ path : ./out
31
60
32
61
- name : Deploy
33
- uses : peaceiris/actions-gh-pages@v4
62
+ uses : peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
34
63
with :
35
64
github_token : ${{ secrets.GITHUB_TOKEN }}
36
65
publish_dir : ./out
You can’t perform that action at this time.
0 commit comments