diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0f1c0133..8ba7cb4a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -128,7 +128,11 @@ jobs: - name: Update ${{ matrix.images.environment }} Deployment uses: bobheadxi/deployments@v1.4.0 - if: always() + # We depend on the 'deployment' step outputs, so we can't run this step + # if the 'deployment' step didn't run. This can happen if any step + # before the 'deployment' step fails. That's why 'always()' is not + # suitable here. + if: steps.deployment.conclusion != 'cancelled' && steps.deployment.conclusion != 'skipped' with: step: finish token: ${{ secrets.GITHUB_TOKEN }}