diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 637c6e2..9c5a005 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,7 @@ jobs: runs-on: [self-hosted, deployment-runner] container: image: git.dbyte.xyz/distro/levant - if: github.ref != 'refs/heads/master' && github.event_name == 'workflow_dispatch' + if: github.ref != 'refs/heads/main' && github.event_name != 'workflow_dispatch' timeout-minutes: 60 steps: - uses: actions/checkout@v4 @@ -37,21 +37,20 @@ jobs: runs-on: [self-hosted, deployment-runner] container: image: multani/nomad - if: github.event_name == 'workflow_dispatch' + if: github.ref != 'refs/heads/main' && github.event_name == 'workflow_dispatch' timeout-minutes: 60 steps: - run: echo "null" - run: nomad status -address=http://nomad.service.consul:4646 - - run: nomad job stop -address=http://nomad.service.consul:4646 -purge blockbot-${GITHUB_SHA} + - run: nomad job stop -address=http://nomad.service.consul:4646 -purge blockbot-${GITHUB_REF_NAME} deploy_prod: needs: - - deploy_review - - stop_review + - build runs-on: [self-hosted, deployment-runner] container: image: git.dbyte.xyz/distro/levant - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch' timeout-minutes: 60 steps: - uses: actions/checkout@v4