-
Notifications
You must be signed in to change notification settings - Fork 2.8k
44 lines (40 loc) · 1.26 KB
/
ci.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: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build project
env:
CODING_USER: ${{ secrets.CODING_USER }}
CODING_TOKEN: ${{ secrets.CODING_TOKEN }}
run: yarn --frozen-lockfile && yarn run deploy
# - name: Upload COS
# uses: zkqiang/[email protected]
# with:
# args: list / -ar && delete -r -f / && upload -r ./docs/.vuepress/dist/ /
# secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
# secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
# bucket: ${{ secrets.TENCENT_CLOUD_BUCKET }}
# region: ap-beijing
- name: Deploy to ECS
uses: cross-the-world/scp-pipeline@master
with:
host: ${{ secrets.ECS_HOST }}
user: ${{ secrets.ECS_USERNAME }}
pass: ${{ secrets.ECS_PASSWORD }}
connect_timeout: 10s
local: './docs/.vuepress/dist/*'
remote: '/var/www/html/'