Skip to content

Commit

Permalink
Merge pull request #43 from lehors/update_deploy_env
Browse files Browse the repository at this point in the history
Change deploy default env
  • Loading branch information
lehors authored Nov 8, 2024
2 parents 07f6415 + cb50cfc commit a8a4265
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
setup-check:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'Production' }}
environment: ${{ inputs.environment || 'Stage' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -33,7 +33,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: setup-check
environment: ${{ inputs.environment || 'Production' }}
environment: ${{ inputs.environment || 'Stage' }}
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}

permissions:
Expand Down
15 changes: 9 additions & 6 deletions DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To install and run MOT locally, see [INSTALL.md](INSTALL.md).
### 1. Test workflow

- **Trigger:**
- Automatically runs on a push to the `main` branch.
- Automatically runs on a push to the `main` branch (which happens when a PR is merged).
- Can also be triggered manually using `workflow_dispatch`.

- **Purpose:**
Expand All @@ -26,14 +26,17 @@ To install and run MOT locally, see [INSTALL.md](INSTALL.md).
### 2. Deploy workflow

- **Trigger:**
- Automatically triggered by the success of the Tests workflow.
- Automatically triggered by the success of the Test workflow.
- Can also be triggered manually using `workflow_dispatch`.

- **Environments:**
- **Environments:**
The deploy workflow operates in two environments:
- **Stage**
- **Production**

When ran automatically Deploy runs against the Stage environment. To deploy to production,
run the Deploy workflow manually with the Production environment.

- **GitHub Secrets:**
The following secrets are required to deploy to either Stage or Production environments:

Expand All @@ -47,9 +50,9 @@ To install and run MOT locally, see [INSTALL.md](INSTALL.md).

### Manual Invocation

The Test and Deploy workflows can be invoked manually using the
`workflow_dispatch` event. This can be useful when you need to deploy without
going through the tests process or when deploying to the stage environment.
The Test and Deploy workflows can be invoked manually using the `workflow_dispatch` event.
This allows you to deploy to the production environment or to deploy without going through the
tests process.

---

Expand Down

0 comments on commit a8a4265

Please sign in to comment.