Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to the course!
We'll learn how to create a workflow that enables Continuous Delivery. You'll:
Before you start, you should be familiar with GitHub and Continuous Integration. If you aren't sure where to start, you may want to check out these two Learning Lab courses:
What is Continuous Delivery?
Martin Fowler defined Continuous Delivery very simply in a 2013 post as follows:
A lot of things go into delivering "continuously". These things can range from culture and behavior to specific automation. In this course, we're going to focus on deployment automation.
Kicking off deployments
Every deployment is kicked off by some trigger. Engineers at many companies, like at GitHub, typically use a ChatOps command as a trigger. The trigger itself isn't incredibly important. In our use case, we'll use labels. When someone applies a "stage" label to a pull request, that'll be our indicator that we'd like to deploy our application to a staging environment.
Step 1: Configure a trigger based on labels
In a GitHub Actions workflow, the
on
step defines what causes the workflow to run. In this case, we want the workflow to run whenever a label is applied to the pull request.⌨️ Activity: Configure the workflow trigger based on a label being added
deploy-staging.yml
file on this branch, or use this quick link (We recommend opening the quick link in another tab)CHANGETHIS
toworkflows
, so the title of this file with the path is.github/workflows/deploy-staging.yml
Your result should look like this: