-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Theo Truong <[email protected]>
- Loading branch information
Showing
9 changed files
with
426 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish Docs to Github Pages | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main, jsdoc] | ||
jobs: | ||
update-docs: | ||
runs-on: ubuntu-latest | ||
name: Update gh-pages with docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
ruby-version: 16.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 | ||
- name: Commit Docs Change | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
add: 'docs/* -f' | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters