diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 555e5f0..d704207 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ env: on: push: branches: - - "main" + - "*" pull_request: branches: @@ -49,3 +49,31 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + deploy-to-prod: + if: contains( github.ref, 'main') + + runs-on: [self-hosted, deployment-runner] + + container: + image: git.dbyte.xyz/distro/levant:latest + + steps: + - uses: actions/checkout@v3 + + - name: Deploy to Nomad + run: cd $GITHUB_WORKSPACE && tools/deploy-prod.sh + + deploy-to-review: + if: contains( github.ref, 'main') == false + + runs-on: [self-hosted, deployment-runner] + + container: + image: git.dbyte.xyz/distro/levant:latest + + steps: + - uses: actions/checkout@v3 + + - name: Deploy to Nomad + run: cd $GITHUB_WORKSPACE && tools/deploy-review.sh diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 005d3b4..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Deploy application to Aperture - -on: - push: - branches: ["*"] - pull_request: - branches: ["*"] - -jobs: - deploy-to-prod: - if: contains( github.ref, 'main') - runs-on: [self-hosted, deployment-runner] - - container: - image: git.dbyte.xyz/distro/levant:latest - - steps: - - uses: actions/checkout@v3 - - - name: Deploy to Nomad - run: cd $GITHUB_WORKSPACE && tools/deploy-prod.sh - - deploy-to-review: - runs-on: [self-hosted, deployment-runner] - - container: - image: git.dbyte.xyz/distro/levant:latest - - steps: - - uses: actions/checkout@v3 - - - name: Deploy to Nomad - run: cd $GITHUB_WORKSPACE && tools/deploy-review.sh