Chore: Deploy #18
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: SaroPay Github Action | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 2 | |
matrix: | |
python-version: [3.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Python Version ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Lint with flake8 | |
run: | | |
flake8 . | |
- name: Runing the tests | |
run: | | |
python manage.py test | |
deploy: | |
runs-on: ubuntu-latest | |
name: deploy our django application to heroku | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Deploy app | |
uses: akhileshns/[email protected] # This is the action | |
with: | |
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | |
heroku_app_name: ${{secrets.HEROKU_APP_NAME}} #Must be unique in Heroku | |
heroku_email: "[email protected]" | |
branch: "master" |