Skip to content

Deploy Prod

Deploy Prod #2

Workflow file for this run

name: Deploy Prod
on:
workflow_dispatch:
# release:
# types:
# - published
# Cancel previous running jobs (save build minutes)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref == 'refs/heads/main' }}
jobs:
Deploy-Prod:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: main
# Setup node and yarn with cache
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build Project
run: yarn build
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
scope: ${{ secrets.VERCEL_ORG_ID }}
vercel-args: '--prod'
# Sources:
# - https://vercel.com/guides/how-can-i-use-github-actions-with-vercel
# - https://aaronfrancis.com/2021/the-perfect-vercel-github-actions-deployment-pipeline