From 7a0d2af95f161d46cd3d3816cd4578170841bfac Mon Sep 17 00:00:00 2001 From: Albert Wang Date: Thu, 18 Apr 2024 15:51:10 -0700 Subject: [PATCH] Add workflows to deploy to Vercel (#258) * add automated action for preview * add workflow for production * update gitignore --- .github/workflows/deploy-preview.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/deploy-prod.yml | 28 ++++++++++++++++++++++ .gitignore | 1 + 3 files changed, 65 insertions(+) create mode 100644 .github/workflows/deploy-preview.yml create mode 100644 .github/workflows/deploy-prod.yml diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml new file mode 100644 index 0000000..e154e66 --- /dev/null +++ b/.github/workflows/deploy-preview.yml @@ -0,0 +1,36 @@ +name: Deploy Preview + +on: + pull_request: + +permissions: + contents: read + pull-requests: write + +jobs: + Site: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: amondnet/vercel-action@v25 + with: + vercel-version: 32.6.1 + github-comment: | + + + + + + + + + + + + + +
NameVenusHacks 2024
PreviewVisit Preview
Commit{{deploymentCommit}}
+ github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_SITE}} diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 0000000..3b806c4 --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,28 @@ +name: Deploy Production + +on: + workflow_run: + workflows: + - Run Checks + types: + - completed + branches: + - main + +permissions: + contents: read + pull-requests: write + +jobs: + Site: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: amondnet/vercel-action@v25 + with: + vercel-version: 32.6.1 + github-comment: false + vercel-args: "--prod" + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_SITE}} diff --git a/.gitignore b/.gitignore index 755d85b..db87166 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ next-env.d.ts # vercel .vercel +/out # dependencies /node_modules