8.1.2 (2023-07-31) #18
Workflow file for this run
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: Build docs | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
docs: | |
runs-on: ubuntu-20.04 | |
container: node:16 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Package Version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
- run: yarn --frozen-lockfile | |
- run: yarn gendoc | |
- name: Deploy v${{ steps.package-version.outputs.current-version }} | |
# This step will copy over generated docs to gh-pages branch, commit and publish | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
keep_files: true | |
publish_dir: ./.typedoc/ | |
destination_dir: ./${{ steps.package-version.outputs.current-version }} | |
full_commit_message: Deploy ${{ steps.package-version.outputs.current-version }} to GitHub Pages | |
- name: Checkout gh-pages | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
# update the index file | |
- env: | |
CURRENT_VERSION: ${{ steps.package-version.outputs.current-version }} | |
run: node insert-new-version.js "${CURRENT_VERSION}" | |
- name: Commit updated index | |
uses: github-actions-x/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
push-branch: 'gh-pages' | |
commit-message: Publish v${{ steps.package-version.outputs.current-version }} | |
files: index.html | |
name: GitHub Actions | |
email: [email protected] |