Skip to content

Commit e3e75ff

Browse files
committed
build(git): Update CI workflow
1 parent e38c622 commit e3e75ff

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Node.js CI
22

3-
on: [ push, pull_request ]
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
types: [ opened, synchronize, closed ]
7+
push:
8+
branches: [ master ]
49

510
jobs:
611
build:
@@ -14,25 +19,13 @@ jobs:
1419
- name: Checkout
1520
uses: actions/checkout@v2
1621

17-
- name: Determine Yarn Cache Path
18-
id: yarn-cache-dir-path
19-
run: echo "::set-output name=dir::$(yarn cache dir)"
20-
21-
- uses: actions/cache@v1
22-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
23-
with:
24-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
25-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
26-
restore-keys: |
27-
${{ runner.os }}-yarn-
28-
2922
- name: Use Node.js ${{ matrix.node-version }}
3023
uses: actions/setup-node@v1
3124
with:
3225
node-version: ${{ matrix.node-version }}
3326

34-
- name: Install Packages
35-
run: yarn install --frozen-lockfile
27+
- name: Install
28+
run: yarn run clean:all && yarn install --frozen-lockfile
3629

3730
- name: Build
3831
run: yarn build

0 commit comments

Comments
 (0)