diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd664b3..b59c330 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -166,14 +166,14 @@ jobs: name: Deploy needs: [ meta, merge ] if: | - ${{ always() + always() && (needs.meta.outputs.tag_exists == 'true' || needs.merge.result == 'success') - && vars.DOKKU_GIT_REMOTE_URL != '' }} runs-on: ubuntu-latest environment: ${{ needs.meta.outputs.environment }} steps: - name: Push to dokku uses: dokku/github-action@master + if: ${{ vars.DOKKU_GIT_REMOTE_URL != '' }} with: git_remote_url: ${{ vars.DOKKU_GIT_REMOTE_URL }} ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}