From eb71d26e038e2d6d5266db8bac99bd8a6c0e3bb4 Mon Sep 17 00:00:00 2001 From: Addie Rudy Date: Wed, 19 Jun 2024 12:30:12 -0400 Subject: [PATCH] ci: updated ci build and synthesize jobs to use pnpm re: #87 --- .github/workflows/build-on-every-push.yml | 45 ++++++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-on-every-push.yml b/.github/workflows/build-on-every-push.yml index c56cbf0..725be7c 100644 --- a/.github/workflows/build-on-every-push.yml +++ b/.github/workflows/build-on-every-push.yml @@ -14,17 +14,37 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 - + cache: 'pnpm' + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + 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: npm ci - + run: pnpm install + - name: Build project - run: npm run build + run: pnpm run build - name: Upload UI Artifact uses: actions/upload-artifact@v4 @@ -43,14 +63,29 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 + cache: 'pnpm' + - uses: actions/cache@v4 + 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: npm ci + run: pnpm install - name: Download UI Artifact uses: actions/download-artifact@v4