Set up workflow for auto-deploying TypeDoc documentation to GitHub Pages #14
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
name: Publish docs to GitHub Pages | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
publish-docs-to-gh-pages: | |
name: Publish docs to GitHub Pages | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Set Swap Space | |
uses: pierotofy/set-swap-space@master | |
with: | |
swap-size-gb: 24 | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install npm dependencies | |
run: npm install | |
- name: Run build script | |
run: npm run build:docs | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./typedoc |