-
Notifications
You must be signed in to change notification settings - Fork 122
33 lines (33 loc) · 987 Bytes
/
gh_pages.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
name: Publish Docs to Github Pages
on:
workflow_dispatch:
push:
branches: [main]
jobs:
update-docs:
runs-on: ubuntu-latest
name: Update gh-pages with docs
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Tools
run: |
sudo apt install -y jq
npm install -g jsdoc
- name: Generate Docs
run: |
export PACKAGE_VERSION=$(jq .version package.json -r | awk -F. '{print $1"."$2}')
export DOC_FOLDER=docs/$PACKAGE_VERSION
jsdoc api lib -d $DOC_FOLDER -r --readme README.md
cp *.md $DOC_FOLDER
cp *.txt $DOC_FOLDER
cp OpenSearch.svg $DOC_FOLDER
- name: Deploy Docs to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
keep_files: true
enable_jekyll: true