-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 843 Bytes
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
on:
workflow_dispatch:
push:
branches:
- production
jobs:
django:
name: Django build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt
- name: Collect static files
working-directory: ./backend/
run: python manage.py collectstatic
- name: Copy files over to the server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "./backend/"
target: "/home/${{ secrets.USERNAME }}/"