Update README.md #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Continuous Deployment | |
on: | |
push: | |
branches: | |
- main | |
- production | |
pull_request: [] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Test | |
run: docker-compose run --rm app sh -c "python manage.py test" | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Lint | |
run: docker-compose run --rm app sh -c "flake8" | |
deploy-staging: | |
name: Deploy to Staging | |
runs-on: ubuntu-20.04 | |
needs: [test, lint] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Deploy to Staging | |
run: echo "Deploy to STAGING code here" | |
deploy-prod: | |
name: Deploy to Production | |
runs-on: ubuntu-20.04 | |
needs: [test, lint] | |
if: github.ref == 'refs/heads/production' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Deploy to Prod | |
run: echo "Deploy to PRODUCTION code here" |