-
Notifications
You must be signed in to change notification settings - Fork 101
42 lines (38 loc) · 1.14 KB
/
main.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: Zuri DM Deployment File
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
#pull_request:
# branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Git Pull on Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.ZURI_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd ~/zc_plugin_dm
git fetch --all
git reset --hard origin/main
git stash
git pull
cd dmplugins
yarn install
yarn build
cd ../dmspa
yarn install
yarn build
cd ~/zc_plugin_dm
source env/bin/activate
pip install -r requirements.txt --upgrade
python3 manage.py collectstatic --noinput
fuser -k 9090/tcp
gunicorn --bind 0.0.0.0:9090 zc_plugin_dm.wsgi --daemon