ci: sync typedoc branch #6
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: Publish Typedoc to Github Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '21' | |
cache: 'npm' | |
- uses: oleksiyrudenko/gha-git-credentials@v2-latest | |
with: | |
token: '${{ secrets.GITHUB_TOKEN }}' | |
- run: corepack enable yarn | |
- run: yarn install | |
- run: git checkout -b typedoc | |
- run: git pull origin main | |
- run: git push origin typedoc | |
- run: yarn typedoc | |
- run: git add . | |
- name: Set outputs | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- run: git commit -m "Update typedoc to commit ${{ steps.vars.outputs.sha_short }}" | |
- run: git push --set-upstream origin typedoc |