-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.03 KB
/
sshtodeploy.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
name: "Deploy Static Files to Server"
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checking Out"
uses: actions/checkout@v3
- name: Setting Up Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
- name: Installing dependencies
run: yarn
- name: Generating Static Files
run: yarn build
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
with:
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SOURCE: "opensource/"
TARGET: ${{ secrets.REMOTE_TARGET }}