Merge pull request #2 from AndreMiras/dependabot/npm_and_yarn/babel/t… #17
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: Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
- name: git config | |
run: | | |
git config user.name documentation-deploy-action | |
git config user.email documentation-deploy-action@@users.noreply.github.com | |
git remote set-url origin https://${{github.actor}}:${{github.token}}@github.com/${{github.repository}}.git | |
- run: npm ci | |
- run: npm run typedoc | |
- name: deploy documentation | |
run: | | |
mv _docs/ /tmp/docs | |
git ls-remote --exit-code . origin/gh-pages \ | |
&& git checkout -b gh-pages \ | |
|| git checkout --orphan gh-pages | |
git reset --hard | |
git pull --set-upstream origin gh-pages || echo probably first commit | |
cp --recursive /tmp/docs/. . | |
echo /node_modules > .gitignore | |
git add --all | |
git commit --all --message ":memo: docs: Update generated documentation" | |
git push origin gh-pages |