Merge pull request #807 from freshbooks/dependabot/npm_and_yarn/axios… #431
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |