-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 978 Bytes
/
delivery.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
name: delivery-action
env:
APP_NAME: "fifteen"
PATH_TO_APPS: "~/apps"
on:
push:
branches: [ master ]
jobs:
delivery_code:
name: Delivery code to server
runs-on: ubuntu-16.04
steps:
- name: Clone repo
uses: actions/checkout@v2
with:
path: ${{ env.APP_NAME }}
- name: Copy repo
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
source: ${{ env.APP_NAME }}
target: ${{ env.PATH_TO_APPS }}
- name: Run rebuild script
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd ${{ env.PATH_TO_APPS }}/${{ env.APP_NAME }}
chmod +x ./rebuild.sh
nohup ./rebuild.sh > nohup.out 2> nohup.err < /dev/null &