Merge branch 'training' into 'main' #804
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 HTML | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Run Sphinx | |
run: | | |
sphinx-build . _build | |
- name: Commit and push to gh-pages | |
run: |- | |
git config --global user.email "[email protected]" | |
git config --global user.name "workflow-bot" | |
git checkout --orphan gh-pages | |
git rm --cached -r . | |
mv CNAME _build .. | |
rm -rf * | |
mv ../_build/* . | |
mv ../CNAME . | |
touch .nojekyll | |
git add . | |
git commit -m "generated using sphinx-build" | |
git push --set-upstream origin gh-pages --force |