-
Notifications
You must be signed in to change notification settings - Fork 71
51 lines (42 loc) · 1.29 KB
/
typedoc-generate-gitbook-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
41
42
43
44
45
46
47
48
49
50
51
name: Deploy TypeDoc to GitBook
on:
push:
branches:
- develop
env:
NODE_VERSION: 18.x
ENTRY_FILE: "packages"
CONFIG_PATH: "tsconfig.base.json"
USES_PNPM: "true"
jobs:
deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build project
run: pnpm build
- name: Build documentation
run: pnpm docs:generate-markdown
- name: Deploy to GitBook
run: |
git clone --branch=git-book https://github.com/near/near-sdk-js.git book
rsync -av --delete markdown-docs/ book/
cd book
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add .
git commit -m "Update documentation [skip ci]"
git push https://frol:${{ secrets.MY_GITHUB_TOKEN }}@github.com/near/near-sdk-js.git git-book