Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(tooling-ci): connect vercel to git #4766

Merged
merged 11 commits into from
Jan 16, 2025
65 changes: 0 additions & 65 deletions .github/workflows/_vercel_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ on:
isExplorer:
type: boolean
required: true
isTypescriptSDK:
type: boolean
required: true
isAppsBackend:
type: boolean
required: true
isAppsUiKit:
type: boolean
required: true
isWalletDashboard:
type: boolean
required: true
shouldDeployPreview:
type: boolean
required: true

concurrency:
group: vercel-deploy-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -44,53 +29,3 @@ jobs:
with:
isProd: false
isStaging: true

ui-kit-preview:
name: Vercel UI Kit Preview
if: inputs.shouldDeployPreview && inputs.isAppsUiKit
uses: ./.github/workflows/apps_ui_kit_deploy.yml
secrets: inherit
with:
isProd: false

ui-kit-prod:
name: Vercel UI Kit Production
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_ui_kit_deploy.yml
secrets: inherit
with:
isProd: true

wallet-dashboard-preview:
name: Vercel Wallet Dashboard Preview
if: inputs.shouldDeployPreview && inputs.isWalletDashboard
uses: ./.github/workflows/apps_wallet_dashboard_deploy.yml
secrets: inherit
with:
isProd: false
isStaging: false

wallet-dashboard-staging:
name: Vercel Wallet Dashboard Staging
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_wallet_dashboard_deploy.yml
secrets: inherit
with:
isProd: false
isStaging: true

apps-backend-preview:
name: Vercel apps-backend Preview
if: inputs.shouldDeployPreview && inputs.isAppsBackend
uses: ./.github/workflows/apps_backend_deploy.yml
secrets: inherit
with:
isProd: false

apps-backend-prod:
name: Vercel apps-backend Production
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_backend_deploy.yml
secrets: inherit
with:
isProd: true
78 changes: 0 additions & 78 deletions .github/workflows/apps_backend_deploy.yml

This file was deleted.

68 changes: 0 additions & 68 deletions .github/workflows/apps_ui_kit_deploy.yml

This file was deleted.

94 changes: 0 additions & 94 deletions .github/workflows/apps_wallet_dashboard_deploy.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/apps_wallet_dashboard_prod_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Production Deploy for Wallet Dashboard

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.WALLET_DASHBOARD_VERCEL_PROJECT_ID }}

on: workflow_dispatch

jobs:
deploy:
permissions:
contents: read
pull-requests: write
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Install Nodejs
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: "20"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: node_modules/.cache/turbo
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-
- name: Install Vercel CLI
run: pnpm add --global vercel@canary
- name: Pull Vercel Env variables (network configs)
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Copy the .env file
run: cp ./.vercel/.env.production.local ./sdk/.env
- name: Build Wallet Dashboard
run: pnpm wallet-dashboard build
- name: Build Vercel Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
6 changes: 0 additions & 6 deletions .github/workflows/hierarchy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
isTypescriptSDK: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/iota-sdk')) }}
isAppsBackend: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'apps-backend')) }}
isAppsUiKit: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/apps-ui-kit')) }}
isWalletDashboard: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'wallet-dashboard')) }}
isGraphQlTransport: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/graphql-transport')) }}
isLedgerjs: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/ledgerjs-hw-app-iota')) }}
steps:
Expand Down Expand Up @@ -145,12 +144,7 @@ jobs:
uses: ./.github/workflows/_vercel_deploy.yml
secrets: inherit
with:
shouldDeployPreview: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }}
isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }}
isAppsBackend: ${{ needs.diff.outputs.isAppsBackend == 'true' }}
isAppsUiKit: ${{ needs.diff.outputs.isAppsUiKit == 'true' }}
isWalletDashboard: ${{ needs.diff.outputs.isWalletDashboard == 'true' }}

ledgernano:
if: (!cancelled() && !failure()) && needs.diff.outputs.isLedgerjs == 'true' && github.event.pull_request.draft == false
Expand Down
Loading