Skip to content

Commit

Permalink
vercel deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
haffi96 committed Oct 14, 2023
1 parent d28bf28 commit d1db966
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/cdk-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: CI
name: Prod deploy

on:
push:
branches: ["master"]
pull_request:
branches: [master]

jobs:
aws_cdk_deploy:
name: CDK Prod Deployment
if: github.event_name == 'push'
environment: production
runs-on: ubuntu-latest
Expand Down Expand Up @@ -45,3 +44,18 @@ jobs:

- name: Deploy stack
run: cdk deploy --all --require-approval never

vercel_prod_deploy:
name: Vercel Prod Deployment
runs-on: ubuntu-latest
needs: [aws_cdk_deploy]
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 }}
21 changes: 21 additions & 0 deletions .github/workflows/vercel-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
pull_request:
branches: ["master"]

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Vercel CLI
run: npm 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 Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

0 comments on commit d1db966

Please sign in to comment.