Deploy Production Branch #773
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 Production Branch | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 6,18 * * *" | |
workflow_dispatch: | |
inputs: | |
skip-cache: | |
description: "Skip Cache" | |
required: true | |
default: true | |
type: boolean | |
force-deploy: | |
description: "Deploy even if tests fail" | |
required: true | |
default: false | |
type: boolean | |
jobs: | |
cache-modifier: | |
uses: ./.github/workflows/cache-modifier.yml | |
with: | |
skip-cache: ${{ github.event.inputs.skip-cache }} | |
call-atlas: | |
uses: ./.github/workflows/realm.yml | |
secrets: inherit | |
needs: cache-modifier | |
with: | |
sha: ${{ github.sha }} | |
environment: production | |
runner-label: ${{ vars.PRODUCTION_RUNNER_LABEL }} | |
call-test-api: | |
uses: ./.github/workflows/test-api.yml | |
needs: cache-modifier | |
secrets: inherit | |
with: | |
sha: ${{ github.sha }} | |
environment: production | |
call-test-build: | |
uses: ./.github/workflows/test-build.yml | |
secrets: inherit | |
needs: [cache-modifier, call-atlas] | |
with: | |
sha: ${{ github.sha }} | |
environment: production | |
netlify-context: production | |
runner-label: ${{ vars.PRODUCTION_RUNNER_LABEL }} | |
cache-modifier: ${{ needs.cache-modifier.outputs.cache-modifier }} | |
call-test-playwright: | |
uses: ./.github/workflows/test-playwright.yml | |
needs: call-test-build | |
secrets: inherit | |
with: | |
sha: ${{ github.sha }} | |
environment: production | |
runner-label: ${{ vars.PRODUCTION_RUNNER_LABEL }} | |
call-test-playwright-full: | |
if: ${{ !failure() && !cancelled() }} | |
uses: ./.github/workflows/test-playwright-full.yml | |
needs: [cache-modifier] | |
secrets: inherit | |
with: | |
sha: ${{ github.sha }} | |
environment: production | |
runner-label: ${{ vars.PREVIEW_RUNNER_LABEL }} | |
call-deploy: | |
if: (inputs.force-deploy == true || success()) && !cancelled() | |
uses: ./.github/workflows/deploy.yml | |
needs: | |
[ | |
cache-modifier, | |
call-test-api, | |
call-test-playwright, | |
call-test-playwright-full, | |
] | |
secrets: inherit | |
permissions: | |
pull-requests: write | |
with: | |
environment: production | |
sha: ${{ github.sha }} | |
netlify-context: production | |
netlify-alias: | |
runner-label: ${{ vars.PRODUCTION_RUNNER_LABEL }} | |
cache-modifier: ${{ needs.cache-modifier.outputs.cache-modifier }} | |
call-process-notifications: | |
needs: call-deploy | |
uses: ./.github/workflows/process-notifications.yml | |
secrets: inherit | |
with: | |
environment: production | |
# inputs from the workflow_dispatch event come as strings even if they are explicitly defined as boolean | |
force-deploy: ${{ inputs.force-deploy == 'true' }} |