Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production deployment workflow #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

github-learning-lab[bot]
Copy link
Contributor

Different triggers

Deployments to production can be manual (like through a Chat Ops command), or automated (if, say, we trust our pull request review process and we've followed continuous integration practices).

We'll trigger a deployment to the production environment whenever something is committed to master. Our master branch is protected, so the only way for commits to appear on master is for a pull request to have been created and gone through the proper review process and merged.

Step 9: Write the production deployment trigger

Let's create a new workflow that deals specifically with commits to master and handles deployments to prod.

⌨️ Activity: Write the production deployment trigger on merge to master

  1. Edit the deploy-prod.yml file on this branch, or use this quick link (We recommend opening the quick link in another tab)
  2. Rename the file in this pull request to .github/workflows/deploy-prod.yml
  3. Add a push trigger
  4. Add branches inside the push block
  5. Add - master inside the branches block
  6. Commit your changes to this branch

The file should look like this when you're finished:

name: Production deployment

on: 
  push:
    branches:
      - master

@github-learning-lab github-learning-lab bot mentioned this pull request Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant