-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 1.71 KB
/
lightsail-deploy.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Continious Deployment To Lightsail Server in Harmfurt
on:
push:
branches: [ master ]
jobs:
copy_content_to_server:
runs-on: ubuntu-latest
steps:
- name: install rsync
run: sudo apt-get install rsync
- name: checkout
uses: actions/checkout@v2
- name: build
run: |
npm ci
npm run build
ls -la
pwd
- name: build & ssh-deploy
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.ACTION_LIGHTSAIL_SECRET }}
ARGS: "-rltgoDzvO --delete"
SOURCE: "docs"
REMOTE_HOST: ${{ secrets.SSH_HOST }}
REMOTE_USER: ${{ secrets.SSH_USER }}
TARGET: ${{ secrets.FOLDER_OF_APP }}
sync-nginx-config:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: build & ssh-deploy
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.ACTION_LIGHTSAIL_SECRET }}
ARGS: "-rltgoDzvO --delete"
SOURCE: "nginx.conf"
REMOTE_HOST: ${{ secrets.SSH_HOST }}
REMOTE_USER: ${{ secrets.SSH_USER }}
TARGET: ${{ secrets.FOLDER_OF_APP }}
launch-nginx-static-serving:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.ACTION_LIGHTSAIL_SECRET }}
script_stop: true
script: |
sudo nginx -t -c ~/CV/nginx.conf
echo 'Hello world of Lightsail'