Skip to content

Commit

Permalink
ci: Update Node.js CI with pnpm and cache
Browse files Browse the repository at this point in the history
Update ci.yml to use pnpm for installation and caching.
Add steps to checkout, install pnpm, get store directory, and setup cache.

made by ollama-commit
  • Loading branch information
clianor committed Jan 16, 2024
1 parent 023d7e2 commit 903c2da
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
name: Node.js CI with pnpm

on:
push:
branches: [main]
pull_request:
branches: [main]
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
node-version: "16.x"
cache: "pnpm"
- name: Install pnpm
run: npm install -g pnpm
version: 8
run_install: false

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

- name: Build
run: pnpm run build

0 comments on commit 903c2da

Please sign in to comment.