Skip to content

Commit

Permalink
ci: split deploy staging and production
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano committed Feb 2, 2024
1 parent 0ef6216 commit a2e76b9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,17 @@ on:
pull_request:
branches: ["*"]
push:
branches: ["master", "next"]
branches: ["master"]
merge_group:

jobs:
deploy_staging:
if: github.ref_name == 'next'
name: Deploy Blobscan API (staging)
runs-on: ubuntu-latest
environment:
name: staging
url: https://staging.blobscan.com
needs: docker
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: deploy
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
script: ./deploy-blobscan.sh

deploy_prod_goerli:
if: github.ref_name == 'master'
name: Deploy Blobscan API (goerli)
runs-on: ubuntu-latest
environment:
name: goerli
url: https://goerli.blobscan.com
needs: docker
steps:
- uses: appleboy/[email protected]
with:
Expand All @@ -43,13 +25,11 @@ jobs:
script: ./deploy-blobscan.sh

deploy_prod_sepolia:
if: github.ref_name == 'master'
name: Deploy Blobscan API (sepolia)
runs-on: ubuntu-latest
environment:
name: sepolia
url: https://sepolia.blobscan.com
needs: docker
steps:
- uses: appleboy/[email protected]
with:
Expand All @@ -60,13 +40,11 @@ jobs:
script: ./deploy-blobscan.sh

deploy_prod_holesky:
if: github.ref_name == 'master'
name: Deploy Blobscan API (holesky)
runs-on: ubuntu-latest
environment:
name: goerli
url: https://holesky.blobscan.com
needs: docker
steps:
- uses: appleboy/[email protected]
with:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
pull_request:
branches: ["*"]
push:
branches: ["next"]
merge_group:

jobs:
deploy_staging:
name: Deploy Blobscan API (staging)
runs-on: ubuntu-latest
environment:
name: staging
url: https://staging.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

0 comments on commit a2e76b9

Please sign in to comment.