-
Notifications
You must be signed in to change notification settings - Fork 140
35 lines (33 loc) · 821 Bytes
/
nodejs.yml
File metadata and controls
35 lines (33 loc) · 821 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
29
30
31
32
33
34
35
name: VuePress to Aliyun
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 下载代码
- uses: actions/checkout@v2
# 安装Nodejs
- name: Setup Node.js 13.2.0
uses: actions/setup-node@v1
with:
node-version: 13.2.0
# 安装依赖和编译
- name: Npm install and build
# 运行的命令或者 action
run: |
npm install
npm run build
# 部署到阿里云
- name: Deploy to Aliyun
uses: easingthemes/ssh-deploy@v2.1.1
env:
SSH_PRIVATE_KEY: ${{ secrets.ACCESS_TOKEN }}
ARGS: "-avzr --delete"
SOURCE: "vuepress/.vuepress/dist"
REMOTE_HOST: "47.98.252.43"
REMOTE_USER: "root"
TARGET: "/root/vuepress"