Skip to content

refactor: deploy-preview.yml #4

refactor: deploy-preview.yml

refactor: deploy-preview.yml #4

name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: production-${{ github.sha }}
cancel-in-progress: true
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Vercel Command Line Tools
run: npm install --global vercel@latest
- name: Fetch Production Environment Configuration
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Application for Production Deployment
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Production Build to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} || exit 1