-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.11 KB
/
CI.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
43
44
45
# A basic action that deploys to the server
name: CI
on: [push]
jobs:
test:
runs-on: Ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Test with pytest
run: python -m pytest
deploy:
needs: test
if: ${{ github.ref_name == 'main' }}
runs-on: ubuntu-latest
steps:
- name: deploy on production server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
cd better-tiss-calendar
git pull
npm install
npx tailwindcss --minify -i app/templates/template.css -o app/static/style.css
source .venv/bin/activate
python -m pip install -r requirements.txt
systemctl --user restart bettercal.service