Skip to content

Commit 093fac0

Browse files
btkostnerjacobgkau
authored andcommitted
chore(ci): update github actions to latest version
1 parent cda5ded commit 093fac0

File tree

3 files changed

+65
-34
lines changed

3 files changed

+65
-34
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
name: CI
43

54
on:
@@ -12,14 +11,23 @@ jobs:
1211

1312
steps:
1413
- name: Checkout
15-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1615

1716
- name: Setup Node.js
18-
uses: actions/setup-node@v2
17+
uses: actions/setup-node@v4
18+
with:
19+
cache: npm
20+
node-version-file: .tool-versions
21+
22+
- id: cache
23+
name: Cache
24+
uses: actions/cache@v4
1925
with:
20-
node-version: 14
26+
path: ./node_modules
27+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2128

22-
- name: Install
29+
- if: steps.cache.outputs.cache-hit != 'true'
30+
name: Install
2331
run: npm ci
2432

2533
- name: Lint
@@ -31,17 +39,26 @@ jobs:
3139

3240
steps:
3341
- name: Checkout
34-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
3543

3644
- name: Setup Node.js
37-
uses: actions/setup-node@v2
45+
uses: actions/setup-node@v4
3846
with:
39-
node-version: 14
47+
cache: npm
48+
node-version-file: .tool-versions
4049

4150
- name: Setup Markdown
4251
uses: xt0rted/markdownlint-problem-matcher@v1
4352

44-
- name: Install
53+
- id: cache
54+
name: Cache
55+
uses: actions/cache@v4
56+
with:
57+
path: ./node_modules
58+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
59+
60+
- if: steps.cache.outputs.cache-hit != 'true'
61+
name: Install
4562
run: npm ci
4663

4764
- name: Lint
@@ -52,23 +69,24 @@ jobs:
5269

5370
steps:
5471
- name: Checkout
55-
uses: actions/checkout@v2
72+
uses: actions/checkout@v4
5673

5774
- name: Setup Node.js
58-
uses: actions/setup-node@v2
75+
uses: actions/setup-node@v4
5976
with:
60-
node-version: 14
77+
cache: npm
78+
node-version-file: .tool-versions
6179

62-
- name: Cache
63-
id: cache
80+
- id: cache
81+
name: Cache
6482
uses: actions/cache@v4
6583
with:
6684
path: ./node_modules
6785
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
6886

69-
- name: Install
87+
- if: steps.cache.outputs.cache-hit != 'true'
88+
name: Install
7089
run: npm ci
71-
if: steps.cache.outputs.cache-hit != 'true'
7290

7391
- name: Build
7492
run: npm run build

.github/workflows/deploy.yml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
name: Deploy
43

54
on:
@@ -8,41 +7,54 @@ on:
87
- master
98

109
jobs:
11-
Deploy:
10+
Build:
1211
runs-on: ubuntu-latest
1312

1413
steps:
1514
- name: Checkout
16-
uses: actions/checkout@v2
17-
with:
18-
fetch-depth: 0
15+
uses: actions/checkout@v4
1916

20-
- name: Setup
21-
uses: actions/setup-node@v2
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
2219
with:
23-
node-version: 14
20+
cache: npm
21+
node-version-file: .tool-versions
2422

25-
- name: Cache
26-
id: cache
23+
- id: cache
24+
name: Cache
2725
uses: actions/cache@v4
2826
with:
2927
path: ./node_modules
3028
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
3129

32-
- name: Install
30+
- if: steps.cache.outputs.cache-hit != 'true'
31+
name: Install
3332
run: npm ci
34-
if: steps.cache.outputs.cache-hit != 'true'
3533

3634
- name: Build
3735
run: npm run build
3836
env:
3937
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4038
NODE_ENV: production
4139

42-
- name: Deploy
43-
uses: peaceiris/actions-gh-pages@v3
40+
- name: Upload
41+
uses: actions/upload-pages-artifact@v3
4442
with:
45-
cname: support.system76.com
46-
github_token: ${{ secrets.RELEASE_TOKEN }}
47-
publish_dir: ./dist
48-
force_orphan: true
43+
path: dist/
44+
45+
Deploy:
46+
needs: Build
47+
runs-on: ubuntu-latest
48+
49+
permissions:
50+
pages: write
51+
id-token: write
52+
53+
environment:
54+
name: Support
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
57+
steps:
58+
- id: deployment
59+
name: Deploy
60+
uses: actions/deploy-pages@v4

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 16.16.0

0 commit comments

Comments
 (0)