Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.88 KB

3-Staged_deployments.md

File metadata and controls

46 lines (30 loc) · 1.88 KB

🔨 Hands-on: Staged deployments

In this hands-on lab your will create environments and a staged deployment workflow with approvals.

This hands on lab is based on My first workflow and adds the following steps:

Creating and protecting environments

  1. Got to Settings | Environments and click New environment
  2. Enter the name Staging and click Configure environment
  3. Add yourself as the Required reviewer for this environment:

image

  1. Only allow the mainbranch to be deployed to this environment:

image

Point the deploy job to an environment

  1. Open your build/deploy workflow file and find the deploy job
  2. In the depoloy job, add the yaml property environment: staging
deploy:
    runs-on: ubuntu-latest
    needs: build
    environment: staging

Reviewing and approving deployments

  1. Open the workflow run and start the review.

image

  1. And approve it with a comment:

  1. The result looks like this and contains the approval and the URL for the staging environment: