fix: put footer and imprint in separate template blocks #95
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
#Github workflow for building documentation | |
# | |
#SPDX-FileCopyrightText: 2022 Birger Schacht | |
#SPDX-License-Identifier: MIT | |
name: "Build documentation" | |
on: | |
push: | |
branches: main | |
paths-ignore: | |
- '.github/**' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: apis-core-rdf | |
ref: main | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install documentation dependencies | |
run: | | |
cd apis-core-rdf | |
pip install poetry | |
poetry config virtualenvs.create false | |
poetry lock | |
poetry install --with docs | |
- name: Build docs | |
run: make -C "$GITHUB_WORKSPACE/apis-core-rdf/docs" html | |
- uses: actions/checkout@v3 | |
with: | |
path: apis-core-rdf-pages | |
ref: pages | |
- name: Commit new docs | |
run: | | |
cd apis-core-rdf-pages | |
git rm -rf * | |
ls $GITHUB_WORKSPACE/apis-core-rdf/docs/_build/html/ | |
cp -r $GITHUB_WORKSPACE/apis-core-rdf/docs/_build/html/* . | |
touch .nojekyll | |
git config user.name github-actions | |
git config user.email [email protected] | |
if ! git diff --exit-code .; then | |
git add . | |
git commit -m "Updated documentation" | |
git push --set-upstream origin pages | |
fi |