Skip to content

Commit

Permalink
gha: fix deployment action
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Jan 17, 2023
1 parent 6f49176 commit 5272681
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
deploy:
if: contains(github.event.head_commit.message, '[stagingdeploy]') || contains(github.event.head_commit.message, '[testnetdeploy]') || contains(github.event.head_commit.message, '[mainnetdeploy]')
if: github.event_name == 'release' || github.ref == 'refs/heads/main' || contains(github.event.head_commit.message, '[stagingdeploy]') || contains(github.event.head_commit.message, '[testnetdeploy]') || contains(github.event.head_commit.message, '[mainnetdeploy]')
name: Deploy
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
for i in 1 2 3 4; do [ $(curl --insecure --silent https://127.0.0.1/api/v1/version | jq .git_commit) = "\"${{ steps.prep.outputs.sha_short}}\"" ] && break || (if [ $i = 4 ]; then exit -1; else sleep 5; fi ) done
echo "All healthy!"
- if: github.ref == 'refs/heads/main'|| contains(github.event.head_commit.message, '[testnetdeploy]')
- if: github.ref == 'refs/heads/main' || contains(github.event.head_commit.message, '[testnetdeploy]')
name: Deploy testnet
uses: appleboy/ssh-action@master
with:
Expand All @@ -78,7 +78,7 @@ jobs:
for i in 1 2 3 4; do [ $(curl --insecure --silent https://127.0.0.1/api/v1/version | jq .git_commit) = "\"${{ steps.prep.outputs.sha_short}}\"" ] && break || (if [ $i = 4 ]; then exit -1; else sleep 5; fi ) done
echo "All healthy!"
- if: github.event_name == 'release' || github.ref == 'refs/heads/main' || contains(github.event.head_commit.message, '[mainnetdeploy]')
- if: github.event_name == 'release' || contains(github.event.head_commit.message, '[mainnetdeploy]')
name: Deploy mainnet
uses: appleboy/ssh-action@master
with:
Expand Down

0 comments on commit 5272681

Please sign in to comment.