Skip to content

Merge pull request #814 from freshbooks/dependabot/npm_and_yarn/types… #430

Merge pull request #814 from freshbooks/dependabot/npm_and_yarn/types…

Merge pull request #814 from freshbooks/dependabot/npm_and_yarn/types… #430

Workflow file for this run

# This workflows will re-generate the api jsdocs when there are changes on main
name: Generate Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: |
cd packages/api
npm install
- name: Run typedoc
run: |
rm -rf docs
cd packages/api
npx typedoc
- name: Commit files
run: |
echo ${{ github.ref }}
git add docs
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "CI: automated Generate Documentation" | exit 0
- name: Push changes
if: github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main