Skip to content

Commit 5c6aa98

Browse files
committed
switch to pnpm and updated publish pipeline to use node 20
1 parent c5e077a commit 5c6aa98

File tree

4 files changed

+8877
-12434
lines changed

4 files changed

+8877
-12434
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,41 @@
11
name: Build
22

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

59
jobs:
610
build:
711
runs-on: ubuntu-latest
812

913
steps:
10-
- name: Begin CI...
11-
uses: actions/checkout@v2
12-
13-
- name: Use Node 14
14-
uses: actions/setup-node@v1
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v2
1516
with:
16-
node-version: 14.x
17-
18-
- name: Use cached node_modules
19-
uses: actions/cache@v1
17+
version: 8.15
18+
- uses: actions/setup-node@v4
2019
with:
21-
path: node_modules
22-
key: nodeModules-${{ hashFiles('**/package-lock.json') }}
23-
restore-keys: |
24-
nodeModules-
25-
26-
- name: Install dependencies
27-
run: npm install
28-
env:
29-
CI: true
20+
node-version: 20
21+
cache: 'pnpm'
22+
- run: pnpm install --frozen-lockfile
3023

3124
- name: Test
32-
run: npm test
25+
run: pnpm test
3326
env:
3427
CI: true
3528

3629
- name: Build
37-
run: npm run prod:build
30+
run: pnpm prod:build
3831
env:
3932
CI: true
4033

4134
- name: Release to GH pages if on master
42-
if: github.ref == 'refs/heads/master'
35+
if: ${{github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'}}
4336
uses: crazy-max/ghaction-github-pages@v1
4437
with:
4538
target_branch: gh-pages
4639
build_dir: dist
4740
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)