Refactor #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | ||
on: | ||
workflow_run: | ||
workflows: | ||
- Run Tests | ||
types: | ||
- completed | ||
jobs: | ||
deploy-to-dev: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event_name == 'pull_request' && github.event.action != 'closed' }} | ||
uses: "./.github/workflows/reusable/deploy.yml" | ||
needs: test | ||
with: | ||
environment: Space2Stats API Dev | ||
stage: pr-${{ github.event.pull_request.number }} | ||
pr-number: ${{ github.event.pull_request.number }} | ||
secrets: inherit | ||
deploy-to-production: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event_name == 'push' && github.ref_name == 'main' }} | ||
uses: "./.github/workflows/reusable/deploy.yml" | ||
needs: test | ||
with: | ||
environment: Space2Stats API Prod | ||
stage: prod | ||
secrets: inherit |