Skip to content

Commit 62f56fc

Browse files
committed
chore: update GHA config
1 parent 0a52edd commit 62f56fc

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

.github/workflows/documentation.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,45 @@
11
name: documentation
22

3-
on:
4-
pull_request:
5-
branches: [master]
6-
push:
7-
branches: [master]
3+
on: [push, pull_request]
84

95
jobs:
106
checks:
11-
if: github.event_name != 'push'
127
runs-on: ubuntu-latest
138
steps:
14-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1510
- uses: actions/setup-node@v3
1611
with:
17-
node-version: 16
12+
node-version: 22
1813
cache: yarn
14+
- uses: actions/cache@v3
15+
id: yarn-cache
16+
with:
17+
path: 'node_modules'
18+
key: yarn-${{ hashFiles('yarn.lock') }}
19+
- run: yarn install --frozen-lockfile
20+
if: steps.yarn-cache.outputs.cache-hit != 'true'
1921
- name: Test Build
2022
run: |
21-
yarn install --frozen-lockfile
2223
yarn lint
2324
yarn typecheck
2425
yarn build
2526
gh-release:
26-
if: github.event_name != 'pull_request'
27+
if: github.ref_name == 'master'
2728
runs-on: ubuntu-latest
29+
needs: checks
2830
steps:
29-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3032
- uses: actions/setup-node@v3
3133
with:
32-
node-version: 16
34+
node-version: 22
3335
cache: yarn
34-
- name: Install dependencies
35-
run: yarn install --frozen-lockfile
36+
- uses: actions/cache@v3
37+
id: yarn-cache
38+
with:
39+
path: 'node_modules'
40+
key: yarn-${{ hashFiles('yarn.lock') }}
41+
- run: yarn install --frozen-lockfile
42+
if: steps.yarn-cache.outputs.cache-hit != 'true'
3643
- name: Build website
3744
env:
3845
TRACKING_ID: ${{ secrets.TRACKING_ID }}

0 commit comments

Comments
 (0)