Skip to content

Commit

Permalink
Re-generate docs (as for v12).
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Mar 30, 2024
1 parent 1ba2a1d commit 2405585
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Update docs

on:
workflow_dispatch:
release:
types: [released]
pull_request:
branches: [ main, development, feat/* ]

permissions:
contents: write

jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v4
with:
ref: "gh-pages"
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: "docs"

- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: |
npm install -g typedoc
- name: Re-generate docs
run: |
MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]")
DOCS_OUTPUT_FOLDER=${GITHUB_WORKSPACE}/docs/${MAJOR_VERSION}
mkdir -p $DOCS_OUTPUT_FOLDER
npm ci
typedoc --out $DOCS_OUTPUT_FOLDER src/index.ts --includeVersion
cd ${GITHUB_WORKSPACE}/docs
# See: https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token
git config user.name github-actions
git config user.email [email protected]
git commit -am "Re-generated docs." --allow-empty
git push

0 comments on commit 2405585

Please sign in to comment.