Skip to content

fix: setup pnpm

fix: setup pnpm #8

Workflow file for this run

name: 🛜 DB Migrations to Staging
on:
push:
branches-ignore:
- "main"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment: preview
steps:
- name: 🏪 Checkout repo
uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
name: 🏠 Setup pnpm
with:
run_install: false
- 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: pnpm install
- name: 🎠 Apply all pending migrations to the database
run: npx prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}