diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70cce7c..239f825 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,11 +7,19 @@ on: branches: [ devel, main ] jobs: - deploy: + environment-check: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} + outputs: + env_name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + steps: + - run: echo "Determining environment..." + + deploy: + needs: environment-check + runs-on: ubuntu-latest environment: - name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + name: ${{ needs.environment-check.outputs.env_name }} steps: - uses: actions/checkout@v4