Skip to content

Setting up repo environments for Somnia deployments

Van Nguyen edited this page Jul 27, 2024 · 2 revisions

As part of #2343, we added automatic test and prod deployments for Somnia, our Discord bot. This requires some setup of environments on the repo that can be a bit hard to replicate without all the knowledge.

Creating Environments

  1. Please create 2 environments: somnia-prod and somnia-test using these instructions, steps 1-4 image
  2. Optionally, set somnia-prod to be restricted to master branch to avoid incidental deployments from a bad workflow file
  3. In each environment, create 2 secrets as follows. For real GO, you do not need to generate these secret values, instead you can find them here:
    1. AZURE_CREDENTIALS: These are the credentials we will use to deploy to our Azure Web App. You can get these by generating a Service Principal with Contributor role on the scope of the web app.
    2. SOMNIA_CREDENTIALS: These are the credentials of the Discord bot. You can find the template at apps/src/somnia/src/config.empty.json, and you can get these values after creating a Discord application