Skip to content

Commit

Permalink
Update CI to use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Mar 1, 2024
1 parent 09930b9 commit 895fe6a
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/main-push-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,27 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- uses: actions/cache@v3
name: Set up cache
- name: Setup pnpm
uses: pnpm/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
version: 8
run_install: false

- name: Set up node
uses: actions/setup-node@v3
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
node-version: '20'
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm i
run: pnpm i --frozen-lockfile

- name: Build application
run: npm run build
Expand Down

0 comments on commit 895fe6a

Please sign in to comment.