Last active
April 11, 2021 16:57
-
-
Save kevinhowbrook/46574255a54ed91e592dee77970d4f18 to your computer and use it in GitHub Desktop.
git hub action to deploy yaml site
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: Deploy to heroku | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Django tests | |
run: | | |
python manage.py collectstatic --clear --noinput | |
python manage.py makemigrations --check --noinput | |
python manage.py check | |
python3 manage.py test | |
- uses: akhileshns/[email protected] | |
with: | |
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | |
heroku_app_name: ${{secrets.HEROKU_APP_PRODUCTION}} | |
heroku_email: ${{secrets.HEROKU_EMAIL}} | |
- name: Success | |
run: echo Successfully Deployed!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment