Hide action keyword panel #264
This file contains hidden or 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 Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| env: | |
| python_ver: 3.11 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ env.python_ver }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ env.python_ver }} | |
| - name: get version | |
| id: version | |
| uses: notiz-dev/github-action-json-property@release | |
| with: | |
| path: 'plugin.json' | |
| prop_path: 'Version' | |
| - run: echo ${{steps.version.outputs.prop}} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r ./requirements.txt | |
| pip install -r ./docs/requirements.txt | |
| - name: Build Docs | |
| run: | | |
| cd docs | |
| sphinx-build -b html -j auto -a -n -T -W --keep-going . _build/${{steps.version.outputs.prop}} | |
| - name: Move Build | |
| id: move-doc-build | |
| run: | | |
| cd .github | |
| cd ci | |
| python move_doc_builds.py | |
| - name: Stash Changes | |
| run: | | |
| git add . | |
| git stash | |
| - name: Switch Branch | |
| run: | | |
| git fetch | |
| git switch gh-pages | |
| - name: Delete Previous Version | |
| continue-on-error: true | |
| run: | | |
| rm -r -v -f ${{ steps.version.outputs.prop }} | |
| - name: Commit Previous Version | |
| run: | | |
| git add . | |
| git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" commit --author="cibere <71997063+cibere@users.noreply.github.com>" -m "Remove previous doc version" --allow-empty | |
| - name: Pop Stash | |
| run: | | |
| git stash pop 0 | |
| - name: Commit New Changes | |
| run: | | |
| git add . | |
| git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" commit --author="cibere <71997063+cibere@users.noreply.github.com>" -m "Apply Doc Changes" --allow-empty | |
| - name: Update Index Page | |
| run: | | |
| cd .scripts | |
| python index_updater.py | |
| - name: Commit Index Paeg | |
| run: | | |
| git add . | |
| git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" commit --author="cibere <71997063+cibere@users.noreply.github.com>" -m "Update Index Page" --allow-empty | |
| - name: Push Changes | |
| continue-on-error: true | |
| run: | | |
| git reset --soft HEAD~3 | |
| git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" commit --author="cibere <71997063+cibere@users.noreply.github.com>" -m "Auto update docs" | |
| git push -f origin gh-pages |