Skip to content

polish: show +n for multiple course codes in modal, other touchups #576

polish: show +n for multiple course codes in modal, other touchups

polish: show +n for multiple course codes in modal, other touchups #576

Workflow file for this run

name: Staging CD
on:
push:
branches: [master]
paths:
- 'frontend/**'
- 'api/**'
- '.github/workflows/staging_cd.yml'
workflow_dispatch:
inputs:
api:
description: 'Deploy API'
type: boolean
frontend:
description: 'Deploy Frontend'
type: boolean
jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
api: ${{ steps.filter.outputs.api }}
frontend: ${{ steps.filter.outputs.frontend }}
db: ${{ steps.filter.outputs.db }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
ref: ${{ github.ref }}
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
api:
- 'api/**'
frontend:
- 'frontend/**'
db:
- 'api/drizzle/schema.ts'
frontend-build-and-deploy:
needs: changes
if: ${{ needs.changes.outputs.frontend == 'true' || inputs.frontend}}
environment:
name: Staging
url: https://staging.coursetable.com
runs-on: ubuntu-latest
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Vercel CLI
run: bun install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token ${{ secrets.VERCEL_TOKEN }}
- name: Deploy to Vercel and Alias Deployment
run: .github/workflows/deployDomain.sh -t ${{ secrets.VERCEL_TOKEN }} -a staging.coursetable.com -d
api-build-and-deploy:
needs: changes
if: ${{ ( needs.changes.outputs.api == 'true' || inputs.api ) && needs.changes.outputs.db == 'false'}}
environment:
name: Staging
url: https://staging.coursetable.com
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Build and Deploy Docker containers
working-directory: ./api
run: ./start.sh -s