@@ -10,28 +10,23 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- name : Checkout commit
13
- uses : actions/checkout@v2
14
- if : ${{ github.event_name == 'push' }}
15
-
16
- - name : Checkout Pull Request
17
- uses : actions/checkout@v2
18
- with :
19
- # TODO: Can we unify the checkout steps i.e. does this value resolve to "undefined" on `push`?
20
- ref : ${{ github.event.pull_request.head.sha }}
21
- if : ${{ github.event_name == 'pull_request' }}
13
+ uses : actions/checkout@v3
22
14
23
- - name : Get yarn cache directory
24
- id : yarn
25
- run : echo "::set-output name=dir::$(yarn cache dir)"
15
+ - name : Read .nvmrc
16
+ run : echo ::set-output name=NVMRC::$(cat .nvmrc)
17
+ id : nvm
26
18
27
- - name : Restore yarn cache
28
- uses : actions/cache@v1.1.2
19
+ - name : Setup node
20
+ uses : actions/setup-node@v3
29
21
with :
30
- path : ${{ steps.yarn .outputs.dir }}
31
- key : ${{ runner.os }}- yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/website/yarn.lock')) }}
22
+ node-version : " ${{ steps.nvm .outputs.NVMRC }}"
23
+ cache : yarn
32
24
33
25
- name : Install dependencies
34
26
run : yarn install --frozen-lockfile
35
27
36
- - name : ' `yarn format` changes committed?'
28
+ - name : " `yarn format` changes committed?"
37
29
run : yarn format:check
30
+
31
+ - name : " `yarn gen-readme` changes committed?"
32
+ run : yarn gen-readme --check
0 commit comments