Skip to content

Commit

Permalink
Fix building mkdocs (#900)
Browse files Browse the repository at this point in the history
* Build mkdocs to gh-pages

* rename requirements.pip to requirements.txt

* exclude requirements from doc deployment

* add docs python to dependabot

* fix wrong merge

* bring back Upload artifact action
  • Loading branch information
dklimpel authored May 18, 2024
1 parent 334f214 commit 65acc48
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ updates:
- "aelsabbahy"
open-pull-requests-limit: 0

- package-ecosystem: "pip"
directory: "/docs"
schedule:
interval: "weekly"
day: "saturday"
8 changes: 4 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --requirement docs/requirements.pip
pip install --requirement docs/requirements.txt
- name: Build documentation
run: mkdocs build
# To remove if not using github pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: site
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ mkdocs:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.pip
- requirements: docs/requirements.txt
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ $(PYTHON):
$(info Creating virtualenv in $(VENV))
@python -m venv $(VENV)

$(DOCS_DEPS): $(PYTHON) docs/requirements.pip
$(DOCS_DEPS): $(PYTHON) docs/requirements.txt
$(info Installing dependencies)
@pip install --upgrade pip
@pip install --requirement docs/requirements.pip
@pip install --requirement docs/requirements.txt
@touch $(DOCS_DEPS)

docs/setup: $(DOCS_DEPS)
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.pip → docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mkdocs-material==9.5.3
mkdocs-macros-plugin==1.0.5
mkdocs-awesome-pages-plugin==2.9.2
mkdocs-exclude==1.0.2
mdx-breakless-lists==1.0.1
pygments==2.17.2

3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ plugins:
- awesome-pages
- macros:
render_by_default: false
- exclude:
glob:
- requirements.txt

markdown_extensions:
- abbr
Expand Down

0 comments on commit 65acc48

Please sign in to comment.