-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (27 loc) · 1.07 KB
/
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
on:
push:
branches:
- main
workflow_dispatch:
jobs:
run_pull:
name: run pull
runs-on: ubuntu-latest
steps:
- name: Execiting remote ssh commands using ssh key
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{secrets.SSH_HOST}}
username: ${{secrets.SSH_USER}}
key: ${{secrets.SSH_PRIVATE_KEY}}
port: ${{secrets.SSH_PORT}}
script: |
cd ${{secrets.WORK_DIR}}
git switch maria
git pull
cd /home/usuario/rhea/rhea-web/
ng build --configuration production --base-href ""
sudo cp -r /home/usuario/rhea/rhea-web/dist/ /var/www/
sudo systemctl restart server
sudo systemctl restart nginx
exit