Skip to content
Rod Falanga (NM DOH) edited this page Aug 24, 2026 · 11 revisions

Welcome to the Explore-Environments wiki!

This repo is so I can gain experience using GitHub Flow. Therefore, I will delete the two branches staging and production. The only long-lasting branch is main. All other branches will be short lived feature or bug branches.

The environments that are created

There are going to be three environments:

  • development
  • staging
  • production

This is what I've learned with 3 GitHub Workflow files and 1 branch

This is the first real iteration of using 3 GitHub Workflow files and one branch. The 3 GitHub Workflow files are:

  • workflow-1.yml
  • workflow-2.yml
  • workflow-3.yml

And of course, just the main branch.

Due to the logic in each of the GitHub Workflow files, they all ran when I committed them, because the logic would run the YAML files on a push.

The next steps I need to take

Delete 2 branches - DONE

  • staging
  • development

Make some branch rules for each branch

  • Make a branch rule for the development branch to run workflow-1.yml
  • Make a branch rule for the staging branch to run workflow-2.yml
  • Make a branch rule for the production branch to run workflow-3.yml

This is no longer needed

Because this repo is now down to only one long-lived branch (main), these branch rules are irrelevant.

How I've changed the Production environment

I made it so that a reviewer is required. Since I am the only one with write permissions to the repo, I made myself the reviewer.

Current configuration

As of 6/11/2026 this repo has only two YAML files:

  • single-workflow-release.yml
  • single-workflow.yml

single-workflow.yml

This workflow will launch two jobs, one to work with the Development environment, and the other to work with the Staging environment. They work fine but note that they both run. At someone's suggestion in the GitHub Action forum, I put in a needs for the staging-deploy step. However, it doesn't delay pausing the staging-deploy step. What I believe it does is make staging-deploy wait for development-deploy to run first, then staging-deploy runs. So, not bad, but note that both jobs run.

single-workflow-release.yml

This GitHub workflow also works but note that it is triggered by creating a new Release in the GitHub.com web interface! It does not work by a PR being created.