Deploy Parser #20
This file contains hidden or 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 Parser | |
| # Deploys the parser product family from `main` — the single deploy branch. | |
| # | |
| # The target environment is resolved by `resolve_targets.yml` (the single place that | |
| # rule lives): an explicit choice on a manual run, a `[deploy-prod]` marker in the | |
| # pushed commit messages (staging first, then production), or staging by default. | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'content/sites/groupdocs/parser/**' | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'Target environment' | |
| required: true | |
| default: production | |
| type: choice | |
| options: | |
| - staging | |
| - production | |
| jobs: | |
| targets: | |
| uses: ./.github/workflows/resolve_targets.yml | |
| with: | |
| environment_override: ${{ github.event_name == 'workflow_dispatch' && inputs.environment || '' }} | |
| staging: | |
| needs: targets | |
| if: ${{ needs.targets.outputs.staging == 'true' }} | |
| uses: ./.github/workflows/deploy_product.yml | |
| with: | |
| product_family: parser | |
| environment: staging | |
| secrets: inherit | |
| # Runs only after staging succeeded (or was skipped by an explicit production choice), | |
| # so a broken build can never reach the live site. | |
| production: | |
| needs: [targets, staging] | |
| if: ${{ always() && needs.targets.outputs.production == 'true' | |
| && needs.staging.result != 'failure' && needs.staging.result != 'cancelled' }} | |
| uses: ./.github/workflows/deploy_product.yml | |
| with: | |
| product_family: parser | |
| environment: production | |
| secrets: inherit |