Skip to content

Commit

Permalink
chore: Publish typedoc on gh pages #1143
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Aug 17, 2024
1 parent 748e001 commit 66eb656
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/typedoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish typedoc on Github Pages

on:
release:
types:
- published
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Generate docs
run: |
npm ci
npm run typedoc
- uses: actions/upload-pages-artifact@v3
with:
name: github-pages
# typedoc "out" path
path: ./typedoc
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ coverage/
dist/
.idea
temp/
typedoc/
.remote-sync.json
tsconfig.tsbuildinfo

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"eslint": "eslint . --ext .ts --max-warnings=0",
"pretty:write": "prettier --write .",
"pretty:check": "prettier --check .",
"docs": "typedoc --tsconfig typedoc-tsconfig.json",
"typedoc": "typedoc --gitRevision $(git describe --tag --abbrev=0) --tsconfig tsconfig.json --excludePrivate --excludeProtected --excludeExternals --entryPointStrategy expand ./src --sourceLinkTemplate 'https://github.com/Koenkk/zigbee-herdsman/blob/{gitRevision}/{path}#L{line}' -out typedoc",
"clean": "rimraf temp coverage dist",
"prepack": "npm run clean && npm run build"
},
Expand Down

0 comments on commit 66eb656

Please sign in to comment.