-
Notifications
You must be signed in to change notification settings - Fork 17
56 lines (47 loc) · 1.4 KB
/
deploy.yml
File metadata and controls
56 lines (47 loc) · 1.4 KB
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
# Simple workflow for deploying static content to server
name: Deploy to server
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
# Allow one concurrent deployment
concurrency:
group: 'deploy'
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: Server
url: ${{ vars.PUBLIC_URL }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v2.5.1
with:
node-version: 16.x
# cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Build
run: |
export PUBLIC_URL=${{ vars.PUBLIC_URL }}
yarn build
- name: Change permission
run: |
chmod 775 -R build
- name: Deploy
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: '-rlgoDzvc -i --delete -p --no-group'
SOURCE: 'build/'
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SSH_CMD_ARGS: '-o StrictHostKeyChecking=no -o ServerAliveInterval=3 -o ProxyJump=${{ secrets.RAS_HOST }}'
TARGET: ${{ secrets.REMOTE_TARGET }}