aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: 0fb4065343b2ba36e1cbd5ccbbf494d74e580d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: Deploy
on: [push]
jobs:
  deploy:
    name: Deploy App
    runs-on: "self-hosted"
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Switch to thatcomputerscientist/thatcomputerscientist/thatcomputerscientist folder
        run: cd thatcomputerscientist/thatcomputerscientist/thatcomputerscientist
      - name: Install Requirements
        run: pip3 install -r requirements.txt
      - name: Run Django Migrations
        run: python3 manage.py migrate
      - name: Run Django Makemigrations
        run: python3 manage.py makemigrations
      - name: Run Django Collectstatic
        run: python3 manage.py collectstatic --noinput
      - name: Kill Gunicorn
        run: pkill gunicorn
      - name: Start Gunicorn
        run: gunicorn --bind :8000 --workers 3 thatcomputerscientist.wsgi --daemon