Skip to content

Commit

Permalink
Feat: Typedoc docs directory adds unnecessary noise to PR (#67)
Browse files Browse the repository at this point in the history
* Feat: Typedoc docs directory adds unnecessary noise to PR

Solution: create a new branch that will receive the documentation generated through a GitHub Action
  • Loading branch information
Rgascoin authored Sep 28, 2022
1 parent 1f88804 commit 1a7197b
Show file tree
Hide file tree
Showing 34 changed files with 55 additions and 2,918 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Generate Doc

on:
push:
branches: [main]

defaults:
run:
shell: bash

jobs:
Doc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Caching Nodes.js modules
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install

- name: Create Doc
run: yarn doc

- name: Push Doc
run: |
BRANCH=gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git fetch origin $BRANCH
git reset --mixed origin/$BRANCH
git add -f docs
git commit -m "Updating documentation: $GITHUB_ACTOR"
git push origin HEAD:$BRANCH
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ dist

# Custom
.idea

# Documentation
docs/
1 change: 0 additions & 1 deletion docs/.nojekyll

This file was deleted.

36 changes: 0 additions & 36 deletions docs/assets/highlight.css

This file was deleted.

Loading

0 comments on commit 1a7197b

Please sign in to comment.