Generate Documentation #84
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
name: Generate Documentation | |
on: | |
workflow_run: | |
workflows: ['Publish to NPM'] | |
branches: [master] | |
types: | |
- completed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: yarn install | |
- name: Generate Documentation | |
run: npx typedoc | |
- name: Commit and Push Documentation | |
run: | | |
git config --global user.name ${{ secrets.GIT_USER_NAME }} | |
git config --global user.email ${{ secrets.GIT_USER_EMAIL }} | |
git add docs | |
git commit -m "Update documentation" || true # The '|| true' is to avoid failure in case there are no changes | |
git push |