From 8ef2744360e4bbace21af3bcf06798f401363a8f Mon Sep 17 00:00:00 2001 From: Sam Der Date: Fri, 3 Nov 2023 11:10:42 -0700 Subject: [PATCH] feat: github workflows --- .github/workflows/deploy-preview.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/deploy-prod.yml | 24 +++++++++++++++++++ 2 files changed, 60 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 00000000..f17d55f2 --- /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@v2 + - uses: amondnet/vercel-action@v25 + with: + vercel-version: 30.2.2 + github-comment: | + + + + + + + + + + + + + +
NameHack at UCI Site
PreviewVisit Preview
Commit{{deploymentCommit}}
+ github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ vars.VERCEL_ORG_ID}} + vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_SITE}} diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 00000000..a67abfac --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,24 @@ +name: Deploy Production + +on: + push: + branches: + - main + +permissions: + contents: read + pull-requests: write + +jobs: + Site: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: amondnet/vercel-action@v25 + with: + vercel-version: 30.2.2 + github-comment: false + vercel-args: "--prod" + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ vars.VERCEL_ORG_ID}} + vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_SITE}}