Fix PNPM path in workflow #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Migrations and Update Challenges | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
run_migrations: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
PNPM_HOME: /pnpm | ||
PATH: $/pnpm:${{ env.PATH }} | ||
Check failure on line 17 in .github/workflows/db.yml
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Nodejs | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install pnpm | ||
run: corepack enable pnpm | ||
- name: Install Dependencies | ||
run: pnpm install | ||
- name: Run Migrations | ||
run: | | ||
cd packages/db \ | ||
npx prisma migrate dev | ||
- name: Update Challenges | ||
run: | | ||
cd packages/db \ | ||
npx tsc && node dist/scripts/index.js | ||