-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 982 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
34
35
36
37
38
39
40
41
42
name: I18N CD
on:
push:
branches: [master]
jobs:
run-test:
services:
postgres:
image: postgres:14.8
env:
POSTGRES_DB: infonex
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1
ports:
- 5432:5432
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: root.settings
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.10.5
- name: requirements
run: pip install -r requirements.txt
deploy:
runs-on: ubuntu-latest
needs: run-test
steps:
- name: Deploy to digitalocean
uses: appleboy/ssh-action@v1.0.0
with:
host: 207.154.212.9
username: root
key: ${{ secrets.KEY }}
script: |
cd InfoNex/
git pull
pip install -r requirements.txt
sudo systemctl restart gunicorn.socket gunicorn.service