Cleaning the github description #35
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
# Building docs into the build branch | |
name: BuildDocs | |
on: | |
push: | |
branches: 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@master | |
with: | |
path: 'main' | |
- name: Checkout build branch | |
uses: actions/checkout@master | |
with: | |
path: 'build' | |
ref: 'build' # switch to build branch | |
- name: Install Deps | |
run: pip install -r "${GITHUB_WORKSPACE}/main/requirements.txt" | |
- name: Build docs | |
run: sphinx-build -b html "${GITHUB_WORKSPACE}/main/docs" "${GITHUB_WORKSPACE}/build" -W --keep-going | |
# -W: convert first warning into error and exit with 1; --keep-going: convert all warnings into errors | |
- name: Push changes into build branch | |
run: | | |
cd "${GITHUB_WORKSPACE}/build" | |
date > generated.txt | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "update documentation bot" | |
git push |