2020-05-24 14:40:43 +03:00
|
|
|
# serve the site locally
|
2022-04-25 23:40:45 +03:00
|
|
|
serve: prepare_files style_check
|
2020-05-24 14:03:04 +03:00
|
|
|
venv/bin/mkdocs serve
|
|
|
|
|
|
2022-04-25 23:40:45 +03:00
|
|
|
serve_dirty: prepare_files style_check
|
|
|
|
|
venv/bin/mkdocs serve --dirtyreload
|
|
|
|
|
|
|
|
|
|
build: prepare_files style_check
|
2020-08-13 14:35:05 +03:00
|
|
|
venv/bin/mkdocs build
|
|
|
|
|
|
2022-04-25 23:40:45 +03:00
|
|
|
# create files that are not versioned inside the mkdocs folder (images, examples)
|
2020-05-24 14:40:43 +03:00
|
|
|
prepare_files: clean
|
2021-12-29 15:41:01 +03:00
|
|
|
mkdir docs/examples
|
2022-04-25 23:40:45 +03:00
|
|
|
cp -r ../json.gif docs/images
|
|
|
|
|
cp -r ../examples/*.cpp ../examples/*.output docs/examples
|
|
|
|
|
|
|
|
|
|
style_check:
|
|
|
|
|
@cd docs ; python3 ../scripts/check_structure.py
|
2020-05-24 14:03:04 +03:00
|
|
|
|
2020-05-24 14:40:43 +03:00
|
|
|
# clean subfolders
|
|
|
|
|
clean:
|
2021-12-29 15:41:01 +03:00
|
|
|
rm -fr docs/images/json.gif docs/examples
|
2020-05-24 14:40:43 +03:00
|
|
|
|
|
|
|
|
# publish site to GitHub pages
|
2020-05-24 14:03:04 +03:00
|
|
|
publish: prepare_files
|
|
|
|
|
venv/bin/mkdocs gh-deploy --clean --force
|
|
|
|
|
|
2020-05-24 14:40:43 +03:00
|
|
|
# install a Python virtual environment
|
|
|
|
|
install_venv: requirements.txt
|
2020-05-24 14:03:04 +03:00
|
|
|
python3 -mvenv venv
|
2022-08-06 00:09:55 +03:00
|
|
|
venv/bin/pip install --upgrade pip
|
2021-12-29 15:41:01 +03:00
|
|
|
venv/bin/pip install wheel
|
2020-05-24 14:03:04 +03:00
|
|
|
venv/bin/pip install -r requirements.txt
|
|
|
|
|
|
2020-05-24 14:40:43 +03:00
|
|
|
# uninstall the virtual environment
|
|
|
|
|
uninstall_venv: clean
|
2020-05-24 14:03:04 +03:00
|
|
|
rm -fr venv
|