Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
bump to node 22 and cache pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickwasused committed May 5, 2024
1 parent b11ce02 commit d76b976
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,31 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 18
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22

- name: install pnpm
run: npm i -g pnpm

- name: Get pnpm store directory
id: pnpm-cache-dir
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
name: Setup pnpm cache
id: pnpm-cache
with:
path: ${{ steps.pnpm-cache-dir.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store

- name: Install packages
run: pnpm i -P

if: steps.pnpm-cache.outputs.cache-hit != 'true'
run: pnpm i

- name: run pnpm build
run: pnpm run build

Expand Down

0 comments on commit d76b976

Please sign in to comment.