Skip to content

Commit

Permalink
build: GitHub actions to generate documentation (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker authored Sep 22, 2022
1 parent 0721086 commit 124faeb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/tsdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# A GitHub Actions workflow that generates the documentation for pull requests

name: tsdoc-markdown

on:
push:

jobs:
docs:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: npm ci

- name: Generate docs
run: npm run docs

- name: Commit docs
uses: EndBug/add-and-commit@v9
# We don't want to commit documentation changes to main
if: ${{ github.ref != 'refs/heads/main' }}
with:
add: .
default_author: github_actions
message: '🤖 Documentation auto-update'
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Install the library in your project from [npm](https://www.npmjs.com/package/tsd
npm install -D tsdoc-markdown
```

## GitHub Actions

A GitHub Actions workflow that generates the documentation for pull requests using this library is available in [tsdoc.yml](/.github/workflows/tsdoc.yml).

## Usage

This tool is shipped with a NodeJS [bin](/bin/index.js) script that can be executed with the shortcut `tsdoc`.
Expand Down Expand Up @@ -71,7 +75,7 @@ generateDocumentation({

<br/>

*Note: Chapter "Functions" is auto-generated with `tsdoc-markdown`.*
_Note: Chapter "Functions" is auto-generated with `tsdoc-markdown`._

<!-- TSDOC_START -->

Expand Down

0 comments on commit 124faeb

Please sign in to comment.