Skip to content

Sync from staging to prod #5

Sync from staging to prod

Sync from staging to prod #5

Workflow file for this run

name: Sync from staging to prod
on:
workflow_dispatch:
push:
tags:
- '**'
jobs:
sync-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Merge staging -> prod
uses: devmasx/merge-branch@master
with:
type: now
from_branch: next
target_branch: prod
github_token: ${{ secrets.GITHUB_TOKEN }}
database-migration:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- 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 }}
- name: Update the classroom data
run: pnpm run update-classroom-data
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}