Skip to content

Commit 1a7197b

Browse files
authored
Feat: Typedoc docs directory adds unnecessary noise to PR (#67)
* Feat: Typedoc docs directory adds unnecessary noise to PR Solution: create a new branch that will receive the documentation generated through a GitHub Action
1 parent 1f88804 commit 1a7197b

34 files changed

+55
-2918
lines changed

.github/workflows/doc.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Generate Doc
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
jobs:
12+
Doc:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 16.x
22+
23+
- name: Get yarn cache directory path
24+
id: yarn-cache-dir-path
25+
run: echo "::set-output name=dir::$(yarn cache dir)"
26+
27+
- name: Caching Nodes.js modules
28+
uses: actions/cache@v3
29+
with:
30+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
31+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-yarn-
34+
35+
- name: Install dependencies
36+
run: yarn install
37+
38+
- name: Create Doc
39+
run: yarn doc
40+
41+
- name: Push Doc
42+
run: |
43+
BRANCH=gh-pages
44+
git config --local user.email "[email protected]"
45+
git config --local user.name "GitHub Action"
46+
47+
git fetch origin $BRANCH
48+
git reset --mixed origin/$BRANCH
49+
git add -f docs
50+
51+
git commit -m "Updating documentation: $GITHUB_ACTOR"
52+
git push origin HEAD:$BRANCH

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,6 @@ dist
106106

107107
# Custom
108108
.idea
109+
110+
# Documentation
111+
docs/

docs/.nojekyll

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/assets/highlight.css

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)