-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.09 KB
/
vuepress-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
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['lts/fermium']
steps:
- name: Checkout
uses: actions/checkout@main
with:
ref: 'master'
persist-credentials: false
fetch-depth: 0
env:
TZ: Asia/Shanghai
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@main
with:
node-version: ${{ matrix.node }}
- name: npm Install
run: npm install
- name: Build VuePress
run: npm run build
- name: Deploy to Pages
env:
TZ: Asia/Shanghai
run: |
cd docs/.vuepress/dist
git init
git config user.name "yanyue404"
git config user.email "1656800216@qq.com"
git add .
git commit -m 'Deploying to gh-pages from Github actions'
git push -f https://ACCESS_TOKEN:${{secrets.ACCESS_TOKEN }}@github.com/yanyue404/my-bookmarks.git master:gh-pages
cd -