Chore: Restructured endpoints for clean doc #23
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: Django Github Action | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 2 | |
matrix: | |
python-version: [3.11.0] # Change to your Python version | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Python Version ${{ matrix.python-version }} | |
uses: actions/setup-python@v4.7.0 | |
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: Run migrations | |
run: | | |
python manage.py migrate | |
# - name: Runing the tests | |
# run: | | |
# python manage.py test | |
deploy: | |
runs-on: ubuntu-latest | |
name: deploy our django application to digital ocean | |
needs: [build] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: DigitalOcean App Platform deployment | |
uses: digitalocean/app_action@v1.1.5 # This is the action | |
with: | |
app_name: porto-shopping-mall-api # Change it to your Digital Ocean app name | |
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} # Set DIGITALOCEAN_ACCESS_TOKEN in Repository secrets | |
# branch: "master" |