Deploy production #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: nohup ./deploy-blobscan.sh | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 500 | |
fetch-tags: true | |
- name: Setup | |
uses: ./tooling/github/setup | |
- name: Set environment variables | |
run: | | |
TAG=$(git describe --tags --always) | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" >> $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 }} | |
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: nohup ./deploy-blobscan.sh | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 500 | |
fetch-tags: true | |
- name: Setup | |
uses: ./tooling/github/setup | |
- name: Set environment variables | |
run: | | |
TAG=$(git describe --tags --always) | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" >> $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 }} | |
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: nohup ./deploy-blobscan.sh | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 500 | |
fetch-tags: true | |
- name: Setup | |
uses: ./tooling/github/setup | |
- name: Set environment variables | |
run: | | |
TAG=$(git describe --tags --always) | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" >> $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 }} | |
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: nohup ./deploy-blobscan.sh | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 500 | |
fetch-tags: true | |
- name: Setup | |
uses: ./tooling/github/setup | |
- name: Set environment variables | |
run: | | |
TAG=$(git describe --tags --always) | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" | |
echo "NEXT_PUBLIC_BLOBSCAN_RELEASE=$TAG" >> $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 }} |