2022-10-23 16:45:54 +01:00
|
|
|
name: "Deploy to Vercel"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-10-23 17:02:02 +01:00
|
|
|
pull_request:
|
2022-10-23 16:45:54 +01:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Deploy to Vercel
|
2023-08-29 01:28:22 +01:00
|
|
|
uses: amondnet/vercel-action@v25.1.1
|
2022-10-23 16:45:54 +01:00
|
|
|
with:
|
|
|
|
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
|
|
|
|
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
|
2022-10-23 17:02:02 +01:00
|
|
|
# use --prod if it is a push to main, otherwise it is a preview
|
|
|
|
vercel-args: ${{ github.event_name != 'pull_request' && '--prod' || '' }}
|