-
-
Notifications
You must be signed in to change notification settings - Fork 88
60 lines (54 loc) · 2.09 KB
/
docusaurus.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
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Docusaurus
on:
# Allow triggering this workflow manually via GitHub CLI/web
workflow_dispatch:
push:
branches: [main]
paths:
- 'packages/documentations/docusaurus.config.js'
- 'packages/documentations/sidebars.js'
- 'packages/documentations/*.json'
- 'packages/documentations/docs/**/*.md'
- 'packages/documentations/docs/**/*.mdx'
- 'packages/documentations/static/**/*.*'
- 'packages/documentations/src/**/*.js'
- 'packages/documentations/src/**/*.css'
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: pnpm/[email protected]
with:
version: latest
run_install: false
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install
pnpm --filter "./packages/documentations" install
- name: Create local build artifacts
run: |
echo 'Building documentations...'
pnpm exec nx build documentations
- name: Create local changes and commit
run: |
cd packages/documentations/build
git init
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "docs: build docs" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: docs
force: true
directory: packages/documentations/build