HOTFIX: use protocol/origin from window (#346) #62
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: Build & Publish Documentation | |
on: | |
push: | |
branches: | |
- master | |
- autodoc | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PUSH_PAGES_PAT }} | |
- name: Build swagger API docs | |
working-directory: ./autodoc/swagger | |
run: | | |
npm ci | |
npm run build | |
- name: Build Sphinx documentation | |
working-directory: ./autodoc/sphinx | |
run: | | |
python -m pip install -r requirements.txt | |
sphinx-build -b html . _build | |
- name: Copy to Github Pages dir | |
working-directory: ./ | |
run: | | |
cp -a ./autodoc/sphinx/_build/. ./docs | |
cp -a ./autodoc/swagger/dist/. ./docs/api | |
- name: Commit doc changes | |
working-directory: ./ | |
run: | | |
git config --global user.name 'GRI Admin' | |
git config --global user.email '[email protected]' | |
git add ./docs/* | |
: # Commit changes if there are any | |
git diff --cached --exit-code || git commit -m "Automated update - Sphinx documentation" | |
git push |