Skip to content

Project Cleanup (#8) #5

Project Cleanup (#8)

Project Cleanup (#8) #5

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
migrate-database:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Run Database Migration
run: npm run migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NODE_ENV: 'production'
build-and-deploy-to-vercel:
runs-on: ubuntu-latest
needs: migrate-database
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}