-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.06 KB
/
main.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: Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm i
- run: npm run docs:build --if-present
- if: ${{ github.event_name == 'push' && success() }}
name: Publish HTML to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.SECRET }}
publish_dir: ./public
enable_jekyll: false
- if: ${{ github.event_name == 'push' && success() }}
name: deploy file to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_IP }}
username: 'root'
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: './public/*'
target: "/home/www/htdocs/wangjunliang/FrontEnd-Engineering-Guide/"
strip_components: 1