Skip to content

Deploy production

Deploy production #63

name: Deploy production
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
workflow_run:
workflows: ["Docker"]
types:
- completed
jobs:
deploy_sepolia:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Deploy Blobscan API (sepolia)
runs-on: ubuntu-latest
environment:
name: sepolia
url: https://sepolia.blobscan.com
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: deploy
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
script: ./deploy-blobscan.sh
- uses: actions/checkout@v3
- name: Setup
uses: ./tooling/github/setup
- 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 }}
deploy_holesky:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Deploy Blobscan API (holesky)
runs-on: ubuntu-latest
environment:
name: holesky
url: https://holesky.blobscan.com
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: deploy
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
script: ./deploy-blobscan.sh
- uses: actions/checkout@v3
- name: Setup
uses: ./tooling/github/setup
- 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 }}
deploy_gnosis:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Deploy Blobscan API (gnosis)
runs-on: ubuntu-latest
environment:
name: gnosis
url: https://gnosis.blobscan.com
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: deploy
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
script: ./deploy-blobscan.sh
- uses: actions/checkout@v3
- name: Setup
uses: ./tooling/github/setup
- 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 }}
deploy_mainnet:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Deploy Blobscan API (mainnet)
runs-on: ubuntu-latest
environment:
name: mainnet
url: https://blobscan.com
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: deploy
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
script: ./deploy-blobscan.sh
- uses: actions/checkout@v3
- name: Setup
uses: ./tooling/github/setup
- 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 }}