Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RanGojo committed Oct 2, 2024
1 parent e548864 commit 3ea1719
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 124 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deploy-bw3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy BW3 Dapp

on:
push:
branches:
- dapp-main

jobs:
deploy:
uses: ./.github/workflows/production-dapp-deployment.yml
with:
vercel_project_id: ${{ inputs.VERCEL_DAPP_BW3_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ inputs.NEXT_DAPP_BW3_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ inputs.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 }}
18 changes: 18 additions & 0 deletions .github/workflows/deploy-dexi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy Dexi Dapp

on:
push:
branches:
- dapp-main

jobs:
deploy:
uses: ./.github/workflows/production-dapp-deployment.yml
with:
vercel_project_id: ${{ inputs.VERCEL_DAPP_DEXI_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ inputs.NEXT_DAPP_DEXI_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ inputs.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 }}
18 changes: 18 additions & 0 deletions .github/workflows/deploy-eld.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy ELD Dapp

on:
push:
branches:
- dapp-main

jobs:
deploy:
uses: ./.github/workflows/production-dapp-deployment.yml
with:
vercel_project_id: ${{ inputs.VERCEL_DAPP_ELD_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ inputs.NEXT_DAPP_ELD_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ inputs.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 }}
18 changes: 18 additions & 0 deletions .github/workflows/deploy-tw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy TW Dapp

on:
push:
branches:
- dapp-main

jobs:
deploy:
uses: ./.github/workflows/production-dapp-deployment.yml
with:
vercel_project_id: ${{ inputs.VERCEL_DAPP_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ inputs.NEXT_DAPP_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ inputs.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 }}
18 changes: 18 additions & 0 deletions .github/workflows/deploy-tw2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy TW2 Dapp

on:
push:
branches:
- dapp-main

jobs:
deploy:
uses: ./.github/workflows/production-dapp-deployment.yml
with:
vercel_project_id: ${{ inputs.VERCEL_DAPP_TW2_EXPLORER_PROJECT_ID }}
next_public_api_key: ${{ inputs.NEXT_DAPP_TW2_EXPLORER_PUBLIC_API_KEY }}
next_public_secret_key: ${{ inputs.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 }}
31 changes: 0 additions & 31 deletions .github/workflows/production-dapp-bw3-deployment.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/production-dapp-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Dapp to Vercel

on:
workflow_call:
inputs:
vercel_project_id:
required: true
type: string
next_public_api_key:
required: true
type: string
next_public_secret_key:
required: true
type: string
secrets:
VERCEL_ORG_ID:
required: true
VERCEL_TOKEN:
required: true
NEXT_PUBLIC_BASE_URL:
required: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
url: ${{ steps.seturl.outputs.url }}
steps:
- uses: actions/checkout@v2
- name: Set API Keys
run: |
echo "VERCEL_ORG_ID=${{ secrets.VERCEL_ORG_ID }}" >> $GITHUB_ENV
echo "VERCEL_TOKEN=${{ secrets.VERCEL_TOKEN }}" >> $GITHUB_ENV
echo "VERCEL_PROJECT_ID=${{ inputs.VERCEL_PROJECT_ID }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_API_KEY=${{ inputs.next_public_api_key }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_SECRET_KEY=${{ inputs.next_public_secret_key }}" >> $GITHUB_ENV
- 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 }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | tee deploy.log
- id: seturl
name: Set preview url
run: echo "url=$(tail -1 deploy.log)">> $GITHUB_OUTPUT
- run: echo "${{ steps.seturl.outputs.url }}"
31 changes: 0 additions & 31 deletions .github/workflows/production-dapp-eldo-deployment.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/production-dapp-tw-deployment.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/production-dapp-tw2-deployment.yml

This file was deleted.

0 comments on commit 3ea1719

Please sign in to comment.