Skip to content

Commit

Permalink
build: Generate and publish API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Jun 9, 2021
1 parent cb36e44 commit b3cd444
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/apidocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Generate API docs

on:
push:
branches:
- master

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1

- name: Generate docs
run: |
npm install
npm run apidocs
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: apidocs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
apidocs
dist
node_modules
coverage
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
apidocs
coverage
examples
test
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"repository": "aholstenson/atvik",
"scripts": {
"test": "jest",
"apidocs": "typedoc",
"ci": "npm run coverage && npm run lint",
"coverage": "jest --coverage",
"lint": "eslint --ext .ts,.tsx .",
Expand Down Expand Up @@ -43,7 +44,7 @@
"jest-config": "^27.0.4",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.3",
"typedoc": "^0.21.0-beta.2",
"typescript": "^4.3.2"
},
"dependencies": {}
}
}
7 changes: 6 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@
},
"include": [
"src"
]
],
"typedocOptions": {
"entryPoints": [ "src/index.ts" ],
"out": "apidocs",
"excludePrivate": true
}
}

0 comments on commit b3cd444

Please sign in to comment.