-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): add
typedoc-json-parser
(#113)
- Loading branch information
1 parent
9743df0
commit eea0d39
Showing
7 changed files
with
210 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
name: Build Documentation | ||
runs-on: ubuntu-latest | ||
|
||
if: github.repository_owner == 'josh-development' | ||
outputs: | ||
NAME: ${{ steps.env.outputs.NAME }} | ||
TYPE: ${{ steps.env.outputs.TYPE }} | ||
SHA: ${{ steps.env.outputs.SHA }} | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Build Documentation | ||
run: yarn docs | ||
- name: Upload Documentation Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: docs | ||
path: docs/api.json | ||
- name: Set Output | ||
id: env | ||
run: | | ||
echo "::set-output name=NAME::${GITHUB_REF_NAME}" | ||
echo "::set-output name=TYPE::${GITHUB_REF_TYPE}" | ||
echo "::set-output name=SHA::${GITHUB_SHA}" | ||
upload: | ||
name: Upload Documentation | ||
needs: build | ||
runs-on: ubuntu-latest | ||
env: | ||
NAME: ${{ needs.build.outputs.NAME }} | ||
TYPE: ${{ needs.build.outputs.TYPE }} | ||
SHA: ${{ needs.build.outputs.SHA }} | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Download Documentation Artifacts | ||
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3 | ||
with: | ||
name: docs | ||
path: docs | ||
- name: Checkout Documentation Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
with: | ||
repository: 'josh-development/docs' | ||
path: 'out' | ||
|
||
- name: Move Documentation | ||
if: ${{ env.TYPE == 'tag' }} | ||
env: | ||
SEMVER: ${{ env.NAME }} | ||
run: | | ||
mkdir -p out/core | ||
mv docs/api.json out/core/${SEMVER}.json | ||
- name: Move Documentation | ||
if: ${{ env.TYPE == 'branch' }} | ||
run: | | ||
mkdir -p out/core | ||
mv docs/api.json out/core/${NAME}.json | ||
- name: Commit & Push | ||
run: | | ||
cd out | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
git add . | ||
git commit -m "docs(core): build for ${TYPE} ${NAME}: ${SHA}" || true | ||
git push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ dist/ | |
# Build Artifacts | ||
dist/ | ||
build/ | ||
docs/ | ||
|
||
# Ignore heapsnapshot and log files | ||
*.heapsnapshot | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json: 'docs/api.json' |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://typedoc.org/schema.json", | ||
"entryPoints": ["src/index.ts"], | ||
"json": "docs/api.json", | ||
"tsconfig": "src/tsconfig.json", | ||
"treatWarningsAsErrors": true | ||
} |
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