Skip to content

Commit

Permalink
switch to pnpm and updated publish pipeline to use node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino committed Feb 11, 2024
1 parent c5e077a commit 5c6aa98
Show file tree
Hide file tree
Showing 4 changed files with 8,877 additions and 12,434 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,41 @@
name: Build

on: [push]
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Begin CI...
uses: actions/checkout@v2

- name: Use Node 14
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
node-version: 14.x

- name: Use cached node_modules
uses: actions/cache@v1
version: 8.15
- uses: actions/setup-node@v4
with:
path: node_modules
key: nodeModules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
nodeModules-
- name: Install dependencies
run: npm install
env:
CI: true
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile

- name: Test
run: npm test
run: pnpm test
env:
CI: true

- name: Build
run: npm run prod:build
run: pnpm prod:build
env:
CI: true

- name: Release to GH pages if on master
if: github.ref == 'refs/heads/master'
if: ${{github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'}}
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 5c6aa98

Please # to comment.