-
Notifications
You must be signed in to change notification settings - Fork 19
40 lines (33 loc) · 851 Bytes
/
docs.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
name: Docs
on:
push:
branches: [main]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Setup user
run: |
git config --global user.email [email protected]
git config --global user.name "Action"
- name: Build docs
run: |
cd docs
yarn install
yarn docs:build
cd .vitepress/dist
git init
git add -A
git commit -m 'deploy'
- name: Deploy docs
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'docs'
force: true
directory: './docs/.vitepress/dist'