Skip to content

Commit

Permalink
docs: use a virtual env for pip deps [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 23, 2024
1 parent 26c18b0 commit 86e68a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ jobs:

- name: Setup pandoc
run: |
wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb
sudo dpkg -i pandoc-3.1.2-1-amd64.deb
rm pandoc-3.1.2-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/3.5/pandoc-3.5-1-amd64.deb
sudo dpkg -i pandoc-3.5-1-amd64.deb
rm pandoc-3.5-1-amd64.deb
- name: Build Documentation
run: |
python -m venv ./.venv
source ./.venv/bin/activate
task docs
- name: Deploy Documentation
Expand Down
19 changes: 12 additions & 7 deletions docs/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# https://taskfile.dev/#6/installation
version: 3

# Run before install pip deps
# python -m venv ./.venv
# source ./.venv/bin/activate

tasks:
readme:
- pip install -q -U pandoc-include
- pipx install pandoc-include
# requires pandoc 3.0.0 or higher
- pandoc -s --filter pandoc-include -o ../README.md ./README.md

docs:
deps:
- readme
cmds:
- pip install -q -U GitPython sphinx-rtd-theme breathe sphinx-sitemap sphinxcontrib-moderncmakedomain myst-parser pandoc-include
- cmake -S ./ -B ./build -G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=Release
- cmake --build ./build --config Release
- touch ./build/.nojekyll
- rm -rf ./build/*.ninja ./build/*log ./build/*.py ./build/CMakeFiles ./build/CMakeCache.txt ./build/*.cmake
- |
pip install GitPython sphinx-rtd-theme breathe sphinx-sitemap sphinxcontrib-moderncmakedomain myst-parser
cmake -S ./ -B ./build -G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release
touch ./build/.nojekyll
rm -rf ./build/*.ninja ./build/*log ./build/*.py ./build/CMakeFiles ./build/CMakeCache.txt ./build/*.cmake
docs.preview:
deps:
Expand All @@ -27,4 +32,4 @@ tasks:
deps:
- docs
cmds:
- npx gh-pages -d ./build/ -t true
- npx -y gh-pages -d ./build/ -t true

0 comments on commit 86e68a9

Please sign in to comment.