diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml new file mode 100644 index 00000000..ac7401be --- /dev/null +++ b/.github/workflows/build-docs.yaml @@ -0,0 +1,47 @@ +name: Docs + +on: + push: + branches: + - master + - main + - "[0-9][0-9].[0-9]+.x" + + pull_request: + branches: + - master + - main + - "[0-9][0-9].[0-9]+.x" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ".[doc]" + + - name: Clone GH-Pages + if: github.event_name != "pull_request" + runs: | + git clone https://github.com/openml-labs/gama.git --single-branch --branch gh-pages docs/build/${{ github.ref }} + + - name: Build Docs + run: | + sphinx-build docs/source docs/build/${{ }} + + - name: Push GH-Pages + if: github.event_name != "pull_request" + runs: | + cd docs/build + git config user.name github-actions + git config user.email github-actions@github.com + git add ${{ github.ref }} + git commit -m "Autodeploy docs" + git push diff --git a/docs/source/conf.py b/docs/source/conf.py index 081bd140..85881bbe 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -90,7 +90,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files.