1
1
name : Deploy static content
2
2
3
3
on :
4
- # Triggers the workflow on push or pull request events but only for the "master" branch
5
4
push :
6
5
branches : ["main"]
7
6
8
- # Allows you to run this workflow manually from the Actions tab
9
7
workflow_dispatch :
10
8
11
- # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
12
9
permissions :
13
10
contents : read
14
11
pages : write
15
12
id-token : write
16
13
17
- # Allow one concurrent deployment
18
14
concurrency :
19
15
group : " pages"
20
16
cancel-in-progress : true
21
17
22
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
23
18
jobs :
24
- # Single deploy job since we're just deploying
25
19
deploy :
26
20
environment :
27
21
name : github-pages
28
22
url : ${{ steps.deployment.outputs.page_url }}
29
23
runs-on : ubuntu-latest
30
24
steps :
31
25
- name : Checkout
32
- uses : actions/checkout@v3
26
+ uses : actions/checkout@v4
27
+
33
28
- name : Set up Node
34
- uses : actions/setup-node@v3
29
+ uses : actions/setup-node@v4
35
30
with :
36
31
node-version : 20
37
32
cache : " npm"
33
+
38
34
- name : Install dependencies
39
35
run : npm install
36
+
40
37
- name : Setup stats
41
38
env :
42
39
STEAM_ID : ${{ secrets.STEAM_ID }}
@@ -46,20 +43,21 @@ jobs:
46
43
GIT_API_KEY : ${{ secrets.GIT_API_KEY }}
47
44
run : |
48
45
bash setup-stats.sh
46
+
49
47
- name : Build
50
- run : |
51
- npm run build
48
+ run : npm run build
49
+
52
50
- name : Copy missing static files
53
- run : |
54
- # Allow all routes to be served by index.html
55
- cp dist/index.html dist/404.html
51
+ run : cp dist/index.html dist/404.html
52
+
56
53
- name : Setup Pages
57
- uses : actions/configure-pages@v3
54
+ uses : actions/configure-pages@v4
55
+
58
56
- name : Upload artifact
59
- uses : actions/upload-pages-artifact@v1
57
+ uses : actions/upload-pages-artifact@v2
60
58
with :
61
- # Upload dist repository
62
59
path : " ./dist"
63
- - name : Deploy to Github Pages
60
+
61
+ - name : Deploy to GitHub Pages
64
62
id : deployment
65
- uses : actions/deploy-pages@v1
63
+ uses : actions/deploy-pages@v2
0 commit comments