Skip to content

Commit

Permalink
chore: refactor dapp deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
RanGojo committed Oct 2, 2024
1 parent 9d2fd12 commit 3ed1458
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/deploy-bw3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ jobs:
vercel_project_id: ${{ secrets.VERCEL_DAPP_BW3_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ secrets.NEXT_DAPP_BW3_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ secrets.NEXT_DAPP_BW3_EXPLORER_PUBLIC_SECRET_KEY }}
secrets:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
next_public_base_url: ${{ secrets.NEXT_PUBLIC_BASE_URL }}

env:
VERCEL_ORG_ID: ${{ inputs.vercel_org_id }}
VERCEL_PROJECT_ID: ${{ inputs.vercel_project_id }}
VERCEL_TOKEN: ${{ inputs.vercel_org_id }}
NEXT_PUBLIC_BASE_URL: ${{ inputs.next_public_base_url }}
7 changes: 3 additions & 4 deletions .github/workflows/deploy-dexi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
vercel_project_id: ${{ secrets.VERCEL_DAPP_DEXI_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ secrets.NEXT_DAPP_DEXI_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ secrets.NEXT_DAPP_DEXI_EXPLORER_PUBLIC_SECRET_KEY }}
secrets:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
next_public_base_url: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
7 changes: 3 additions & 4 deletions .github/workflows/deploy-eld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
vercel_project_id: ${{ secrets.VERCEL_DAPP_ELD_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ secrets.NEXT_DAPP_ELD_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ secrets.NEXT_DAPP_ELD_EXPLORER_PUBLIC_SECRET_KEY }}
secrets:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
next_public_base_url: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
7 changes: 3 additions & 4 deletions .github/workflows/deploy-tw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
vercel_project_id: ${{ secrets.VERCEL_DAPP_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ secrets.NEXT_DAPP_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ secrets.NEXT_DAPP_EXPLORER_PUBLIC_SECRET_KEY }}
secrets:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
next_public_base_url: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
7 changes: 3 additions & 4 deletions .github/workflows/deploy-tw2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
vercel_project_id: ${{ secrets.VERCEL_DAPP_TW2_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ secrets.NEXT_DAPP_TW2_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ secrets.NEXT_DAPP_TW2_EXPLORER_PUBLIC_SECRET_KEY }}
secrets:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
next_public_base_url: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
14 changes: 7 additions & 7 deletions .github/workflows/production-dapp-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:
next_public_secret_key:
required: true
type: string
secrets:
VERCEL_ORG_ID:
vercel_org_id:
required: true
VERCEL_TOKEN:
type: string
vercel_token:
required: true
NEXT_PUBLIC_BASE_URL:
next_public_base_url:
required: true

jobs:
Expand All @@ -31,11 +31,11 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
run: vercel pull --yes --environment=production --token=${{ inputs.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
run: vercel build --prod --token=${{ inputs.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | tee deploy.log
run: vercel deploy --prebuilt --prod --token=${{ inputs.VERCEL_TOKEN }} | tee deploy.log
- id: seturl
name: Set preview url
run: echo "url=$(tail -1 deploy.log)">> $GITHUB_OUTPUT
Expand Down

0 comments on commit 3ed1458

Please sign in to comment.