-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (37 loc) · 988 Bytes
/
deploy.yml
File metadata and controls
40 lines (37 loc) · 988 Bytes
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: Frontend CD
on:
push:
branches: [ prod ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Check Build
run: npm run build
env:
CI: true
- name: Running remote SSH commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
cd /home/glugwebsite/lugnitdgp.github.io
git checkout prod
git pull origin prod
npm run build
cd ~
sudo systemctl restart nginx