-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.38 KB
/
deploy.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
45
46
47
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout ️
uses: actions/[email protected]
- name: Install and Build
run: |
npm install
npm run build
# 部署到 GitHub Pages
- name: Deploy to GitHub Pages
# 此actions的官方文档 https://github.com/JamesIves/github-pages-deploy-action
uses: JamesIves/github-pages-deploy-action@v4
with:
# 要部署的文件夹,必填
FOLDER: docs/.vuepress/dist
# 希望部署的分支,默认gh-pages
BRANCH: gh-pages
# 发布npm
# - uses: actions/setup-node@v2
# with:
# node-version: '12.x'
# registry-url: 'https://registry.npmjs.org'
# - run: npm install
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Deploy to self-host server
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.SSH_HOST }}
# port: ${{ secrets.SSH_PORT }}
# username: ${{ secrets.SSH_USERNAME }}
# password: ${{ secrets.SSH_PASSWORD }}
# command_timeout: "20m"
# source: "./docs/.vuepress/dist/"
# strip_components: 4
# target: "${{ secrets.DOCS_SERVER_DIR }}"