-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.13 KB
/
site-build-push.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
name: Gatsby Site Build And Push
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# from: https://github.com/actions/checkout
- name: Checkout Repository main branch
uses: actions/checkout@main
# from: https://github.com/actions/setup-node
- name: Setup Node.js 12.x
uses: actions/setup-node@master
with:
node-version: "12.x"
- name: Setup Dependencies and Build Project
run: |
npm install -S
npm run build
chmod 755 -R public
# from https://github.com/yeshan333/rsync-deploy-action
# push to tencent cloud cvm
- name: Push blog to tencentyun CVM
uses: yeshan333/rsync-deploy-action@v1.1.0
with:
ssh_login_username: ${{ secrets.SSH_LOGIN_USERNAME }}
remote_server_ip: ${{ secrets.REMOTE_SERVER_IP }}
ssh_port: ${{ secrets.SSH_PORT }}
ssh_private_key: ${{ secrets.GATSBY_DEPLOY_PRIVATE_KEY_BACKUP }}
source_path: ./public/*
destination_path: ~/slides.shan333.cn