From a1794bba4ac76978c05aad060cc29f681485a6c8 Mon Sep 17 00:00:00 2001 From: smokestacklightnin <125844868+smokestacklightnin@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:17:49 -0700 Subject: [PATCH] Add notes on manual deployment and point production deployment to manual instructions --- web/deploy/terraform/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/deploy/terraform/README.md b/web/deploy/terraform/README.md index 4e8ebec..bf56f71 100644 --- a/web/deploy/terraform/README.md +++ b/web/deploy/terraform/README.md @@ -115,3 +115,13 @@ If none of the files in a pull request are included in `web/deploy/terraform` or If any of the files in a pull request is included in `web/deploy/terraform` or `.github/workflows/deploy-opentofu.yml`, then both `deploy-docker.yml` and `deploy-opentofu.yml` will be run. In this case, however, `deploy-docker.yml` will see that paths dealing with OpenTofu were modified and terminate early and successfully without doing anything. At the same time, `deploy-opentofu.yml` will run and redeploy both shared and staging resources to the staging EC2 instance. After running all OpenTofu actions successfully, `deploy-opentofu.yml` will run `deploy-docker.yml` as a child workflow via the [`workflow_call`](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_call) trigger. This way, the potent parts of `deploy-docker.yml`, i.e. the parts that actually build and deploy images, is only run once per merged pull request. ### Deployment to Production + +The way to deploy to production is to [manually dispatch your desired workflow](#manual-deployment-from-github-actions). + +Note that running the OpenTofu deployment to production will _not_ redeploy the shared resources. + +### Manual Deployment from GitHub Actions + +You can manually deploy the [Docker images](https://github.com/nimh-dsst/osm/actions/workflows/deploy-docker.yml) and [OpenTofu deployment](https://github.com/nimh-dsst/osm/actions/workflows/deploy-opentofu.yml) by navigating to the appropriate action and clicking the "Run workflow" button to reveal the associated menu. Using that menu, you can dispatch either workflow from an arbitrary branch in the repository to either staging or production. + +Note that running the OpenTofu deployment will automatically run the Docker deployment as a child workflow.