Skip to content

Commit

Permalink
Update vercel deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Nov 23, 2023
1 parent fa1e61c commit 620c8d4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ permissions:
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
environment: Open Healthcare Network
environment:
name: Preview
url: ${{ steps.deploy.outputs.deployment_url }}
steps:
- name: Checkout Leaderboard
uses: actions/checkout@v4
Expand Down Expand Up @@ -49,4 +51,7 @@ jobs:
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
id: deploy
run: |
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > url
echo "deployment_url=$(cat url)" >> $GITHUB_OUTPUT
12 changes: 7 additions & 5 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ on:
jobs:
Deploy-Production:
runs-on: ubuntu-latest
environment: Open Healthcare Network
environment:
name: Open Healthcare Network
url: ${{ steps.deploy.outputs.deployment_url }}
steps:
- name: Checkout Leaderboard
uses: actions/checkout@v4
Expand All @@ -22,9 +24,6 @@ jobs:
uses: actions/checkout@v4
with:
path: ./data-repo
sparse-checkout: |
data
contributors

- name: Remove existing files if any (temperory)
run: rm -rf ./data ./contributors
Expand All @@ -50,4 +49,7 @@ jobs:
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
id: deploy
run: |
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} > url
echo "deployment_url=$(cat url)" >> $GITHUB_OUTPUT
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vercel
.env

0 comments on commit 620c8d4

Please sign in to comment.