Skip to content

Commit 88d4d9a

Browse files
committed
Generate JSON from JsDoc
1 parent 48db9d8 commit 88d4d9a

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

.github/workflows/docs.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
name: Create PR on Docs repo
22
on:
33
push:
4-
paths:
5-
- 'docs/api/**'
6-
branches:
7-
- main
4+
# branches:
5+
# - main
86

97
jobs:
108
pull-request:
119
runs-on: ubuntu-latest
1210
steps:
1311
- name: Checkout
14-
uses: actions/checkout@v2
15-
- name: Set BRANCH_NAME
16-
run: echo "BRANCH_NAME=JS-Reference-Updates-$(date +%s)" >> $GITHUB_ENV
17-
- name: Create pull request in terminusdb/terminusdb-docs
18-
uses: paygoc6/action-pull-request-another-repo@v1.0.1
19-
env:
20-
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
21-
with:
22-
source_folder: 'docs/api/.'
23-
destination_repo: 'terminusdb/terminusdb-docs'
24-
destination_folder: 'guides/reference-guides/javascript-client-reference'
25-
destination_base_branch: 'main'
26-
destination_head_branch: ${{ env.BRANCH_NAME }}
27-
user_email: 'neel@terminusdb.com'
28-
user_name: 'Neelterminusdb'
29-
pull_request_reviewers: 'mark-terminusdb'
12+
uses: actions/checkout@v3
13+
- name: Clone JSDoc template
14+
run: git clone https://github.com/terminusdb-labs/jsdoc-terminusdb-template.git
15+
- name: Run NPM Install
16+
run: npm i
17+
- name: Run JSDoc
18+
run: npx jsdoc --template ./jsdoc-terminusdb-template --recurse ./lib/ > docs.json
19+
- name: Upload to TerminusCMS
20+
run: |
21+
curl -H 'Authorization: Token ${{ secrets.TERMINUSCMS_TOKEN}}' \
22+
-H 'Content-Type: application/json' \
23+
'${{ secrets.TERMINUSCMS_URL}}' -d @./docs.json

0 commit comments

Comments
 (0)