-
Notifications
You must be signed in to change notification settings - Fork 181
74 lines (60 loc) · 1.71 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
name: Documentation
on:
push:
branches:
- 3.x
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_COMMIT }}
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
ref: '3.x'
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_COMMIT }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install packages
run: npm install
- name: Install typescript
run: npm install -g typescript
- name: Build Typescript
run: npm run compile
- name: Build Typedoc
run: npm run typedoc
- name: Update markdown files
run: |
cd docs
../scripts/adjustMarkdown.sh
- name: Build example markdown
run: node scripts/generateExample.mjs
- name: Final Adjustment to files
run: |
mv docs/packages.md docs/HOME.md
mv docs/EXAMPLES.md .
rm -rf docs/index.md docs/docs.json
- name: Sync Wiki to Docs
uses: newrelic/wiki-sync-action@main
with:
source: docs
destination: wiki
token: ${{ secrets.GH_TOKEN_COMMIT}}
gitAuthorName: github-actions
gitAuthorEmail: [email protected]
branch: main
- name: Copy and commit example markdown
continue-on-error: true
run: |
git config --local user.name github-actions
git config --local user.email [email protected]
git add EXAMPLES.md
git commit -m "docs: updated example markdown"
git push --force-with-lease