Skip to content

[AUTOCUT] Update opensearch-js to reflect the latest OpenSearch API s… #304

[AUTOCUT] Update opensearch-js to reflect the latest OpenSearch API s…

[AUTOCUT] Update opensearch-js to reflect the latest OpenSearch API s… #304

Workflow file for this run

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