-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 904 Bytes
/
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
name: Bourse Forex
run-name: Deploy
on:
push:
branches:
- main
jobs:
mirror:
runs-on: ubuntu-latest
name: Mirror to server
steps:
- name: Mirror
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
script: |
cd /home/ubuntu/bourse-forex
git pull
deploy:
runs-on: ubuntu-latest
needs: mirror
name: deploy on vps
steps:
- name: Push on remote repo
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
script: |
sudo systemctl stop bourse
sudo systemctl start bourse