Skip to content

Commit

Permalink
chore(repo): updates to vercel deployments - token and org id handling (
Browse files Browse the repository at this point in the history
#17059)

Co-authored-by: Karim <[email protected]>
  • Loading branch information
kimo-ice and Karim authored May 9, 2024
1 parent 90944a2 commit 03441fc
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
flags: ''
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_HEKLA }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_bridge-ui_devnet_preview:
if: ${{ github.ref_name != 'main' }}
Expand All @@ -34,6 +36,8 @@ jobs:
flags: ''
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_INTERNAL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_bridge-ui_hekla_production:
if: ${{ github.ref_name == 'main' && contains(github.ref, 'refs/tags/bridge-ui-') }}
Expand All @@ -44,3 +48,5 @@ jobs:
flags: '--prod'
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_HEKLA }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/guardians-ui-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Guardians UI Checks and Build
name: Guardians UI Build and Checks

on:
workflow_call
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/guardians-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
flags: ''
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_UI_HEKLA }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_guardians-ui_devnet_preview:
if: ${{ github.ref_name != 'main' }}
Expand All @@ -44,3 +46,5 @@ jobs:
flags: '--prod'
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_UI_HEKLA }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/taikoon-ui-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Taikoon UI Checks
name: Taikoon UI Build and Checks

on:
workflow_call
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/taikoon-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
flags: ''
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_TAIKOON_UI_MAINNET }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_taikoon-ui_mainnet_production:
if: ${{ github.ref_name == 'main' && contains(github.ref, 'refs/tags/taikoon-ui-') }}
Expand All @@ -34,3 +36,5 @@ jobs:
flags: '--prod'
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_TAIKOON_UI_MAINNET }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
16 changes: 11 additions & 5 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy Bridge UI to Vercel
name: Vercel Build and Deploy

on:
workflow_call:
Expand All @@ -13,9 +13,15 @@ on:
vercel_project_id:
description: 'Vercel Project ID'
required: true
vercel_org_id:
description: 'Vercel ORG ID'
required: true
vercel_token:
description: 'Vercel TOKEN'
required: true

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_ORG_ID: ${{ secrets.vercel_org_id }}
VERCEL_PROJECT_ID: ${{ secrets.vercel_project_id }}

jobs:
Expand All @@ -32,10 +38,10 @@ jobs:
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.vercel_token }}

- name: Build Project Artifacts
run: vercel build ${{ inputs.flags }} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel build ${{ inputs.flags }} --token=${{ secrets.vercel_token }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt ${{ inputs.flags }} --token=${{ secrets.VERCEL_TOKEN }}
run: vercel deploy --prebuilt ${{ inputs.flags }} --token=${{ secrets.vercel_token }}

0 comments on commit 03441fc

Please sign in to comment.