Skip to content

docs: generate api documentation as a GitHub workflow #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/api-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: API Docs

on: release

jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Generate API documentation
run: npm install && npm run generate-docs
-
name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs
commit_message: |
Deploy to GitHub Pages
Signed-off-by: Lance Ball <[email protected]>
allow_empty_commit: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 6 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test:ts": "mocha --require ts-node/register ./test-ts/**/*.ts",
"coverage": "nyc --reporter=lcov --reporter=text npm run test",
"coverage-publish": "wget -qO - https://coverage.codacy.com/get.sh | bash -s report -l JavaScript -r coverage/lcov.info",
"generate-docs": "typedoc --tsconfig ./tsconfig.json --plugin typedoc-plugin-markdown src",
"generate-docs": "typedoc --excludeNotDocumented --out docs src",
"release": "standard-version",
"prepublish": "npm run build"
},
Expand Down Expand Up @@ -99,6 +99,7 @@
"dependencies": {
"ajv": "~6.12.0",
"axios": "~0.19.2",
"typedoc-clarity-theme": "^1.1.0",
"uuid": "~8.0.0"
},
"devDependencies": {
Expand All @@ -118,7 +119,6 @@
"standardx": "^5.0.0",
"ts-node": "^8.10.2",
"typedoc": "^0.17.7",
"typedoc-plugin-markdown": "^2.2.17",
"typescript": "^3.8.3"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/formats/json/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const nullOrUndefinedPayload = new ValidationError("null or undefined payload");
const asJSON = (v: object|string) => (isString(v) ? JSON.parse(v as string) : v);

class JSONParser {
decorator: any
decorator: Base64Parser
constructor(decorator: Base64Parser) {
this.decorator = decorator;
}
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
"typedocOptions": {
"out": "docs",
"mode": "file"
"mode": "file",
"theme": "node_modules/typedoc-clarity-theme/bin"
}
}