diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index d8220734ce..9e8aa2e544 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -14,6 +14,19 @@ on: - 'packages/db/**' - '.github/workflows/api.yml' - 'package-lock.json' + workflow_dispatch: + inputs: + force_deploy_staging: + description: whether to deploy to staging even if the job wouldn't normally run + required: true + type: boolean + default: false + force_deploy_production: + description: whether to deploy to production even if the job wouldn't normally run + required: true + type: boolean + default: false + jobs: test: runs-on: ubuntu-latest @@ -52,7 +65,7 @@ jobs: deploy-staging: name: Deploy Staging - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || inputs.force_deploy_staging runs-on: ubuntu-latest needs: test environment: @@ -88,7 +101,7 @@ jobs: deploy-production: name: Deploy Production - if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created) || inputs.force_release + if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created) || inputs.force_deploy_production runs-on: ubuntu-latest needs: - test