-
Notifications
You must be signed in to change notification settings - Fork 2
28 lines (28 loc) · 1005 Bytes
/
deploy.yml
File metadata and controls
28 lines (28 loc) · 1005 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
name: Deploy and Start Server
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_RC_KEY }}
ARGS: "-avzc --delete"
SOURCE: "."
REMOTE_HOST: ${{ secrets.SSH_RC_HOST }}
REMOTE_USER: ${{ secrets.SSH_RC_USERNAME }}
REMOTE_PORT: ${{ secrets.SSH_RC_PORT }}
TARGET: "/usr/share/nginx/referencecollection/html/referencecollection.com"
EXCLUDE: "/dist/, /node_modules/, /.git/, /.github/"
- name: Start Node.js Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_RC_HOST }}
username: ${{ secrets.SSH_RC_USERNAME }}
port: ${{ secrets.SSH_RC_PORT }}
key: ${{ secrets.SSH_RC_KEY }}
script: |
cd /usr/share/nginx/referencecollection/html/server
node server.js