Skip to content

Commit

Permalink
feat: github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
samderanova committed Nov 3, 2023
1 parent becea4b commit 8ef2744
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -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: |
<table>
<tr>
<td><strong>Name</strong></td>
<td>Hack at UCI Site</td>
</tr>
<tr>
<td><strong>Preview</strong></td>
<td><a href='{{deploymentUrl}}'>Visit Preview</a></td>
</tr>
<tr>
<td><strong>Commit</strong></td>
<td>{{deploymentCommit}}</td>
</tr>
</table>
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}}
24 changes: 24 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -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}}

0 comments on commit 8ef2744

Please sign in to comment.