mirror of
https://github.com/aaronleetw/Attendance.git
synced 2024-11-14 19:11:39 -08:00
25 lines
560 B
YAML
25 lines
560 B
YAML
name: Flask CICD
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: CD
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
USERNAME: ${{ secrets.USERNAME }}
|
|
KEY: ${{ secrets.SSHKEY }}
|
|
script: |
|
|
cd /home/ubuntu/Attendance
|
|
git pull
|
|
source ./Attendance/bin/activate
|
|
pip install -r requirements.txt
|
|
deactivate
|
|
sudo systemctl restart Attendance.service
|