Skip to content

Commit

Permalink
adds workflow to generate docs on push to main (#93)
Browse files Browse the repository at this point in the history
* adds workflow to generate docs on push to main
  • Loading branch information
m00sey authored Aug 23, 2023
1 parent 5158f30 commit 2ee551e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ on:
workflow_dispatch:
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
name: Build, lint, and test on Node 18.12.1 and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest]
os: [ macOS-latest, ubuntu-latest]

steps:
- name: Checkout repo
Expand All @@ -38,4 +38,4 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/update-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
update:
name: Updater documentation

runs-on: ubuntu-latest

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

- uses: actions/setup-node@v2
with:
node-version: '18.12.1'
cache: 'npm'

- name: build
run: |
npm cache clean --force
npm set registry https://registry.npmjs.org/
npm i
npx typedoc src/index.ts
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -a -m "Update documentation"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit 2ee551e

Please sign in to comment.