1c5f01b2fSopenharmony_ci# serve the site locally
2c5f01b2fSopenharmony_ciserve: prepare_files style_check
3c5f01b2fSopenharmony_ci	venv/bin/mkdocs serve
4c5f01b2fSopenharmony_ci
5c5f01b2fSopenharmony_ciserve_dirty: prepare_files style_check
6c5f01b2fSopenharmony_ci	venv/bin/mkdocs serve --dirtyreload
7c5f01b2fSopenharmony_ci
8c5f01b2fSopenharmony_cibuild: prepare_files style_check
9c5f01b2fSopenharmony_ci	venv/bin/mkdocs build
10c5f01b2fSopenharmony_ci
11c5f01b2fSopenharmony_ci# create files that are not versioned inside the mkdocs folder (images, examples)
12c5f01b2fSopenharmony_ciprepare_files: clean
13c5f01b2fSopenharmony_ci	mkdir docs/examples
14c5f01b2fSopenharmony_ci	cp -r ../json.gif docs/images
15c5f01b2fSopenharmony_ci	cp -r ../examples/*.cpp ../examples/*.output docs/examples
16c5f01b2fSopenharmony_ci
17c5f01b2fSopenharmony_cistyle_check:
18c5f01b2fSopenharmony_ci	@cd docs ; python3 ../scripts/check_structure.py
19c5f01b2fSopenharmony_ci
20c5f01b2fSopenharmony_ci# clean subfolders
21c5f01b2fSopenharmony_ciclean:
22c5f01b2fSopenharmony_ci	rm -fr docs/images/json.gif docs/examples
23c5f01b2fSopenharmony_ci
24c5f01b2fSopenharmony_ci# publish site to GitHub pages
25c5f01b2fSopenharmony_cipublish: prepare_files
26c5f01b2fSopenharmony_ci	venv/bin/mkdocs gh-deploy --clean --force
27c5f01b2fSopenharmony_ci
28c5f01b2fSopenharmony_ci# install a Python virtual environment
29c5f01b2fSopenharmony_ciinstall_venv: requirements.txt
30c5f01b2fSopenharmony_ci	python3 -mvenv venv
31c5f01b2fSopenharmony_ci	venv/bin/pip install --upgrade pip
32c5f01b2fSopenharmony_ci	venv/bin/pip install wheel
33c5f01b2fSopenharmony_ci	venv/bin/pip install -r requirements.txt
34c5f01b2fSopenharmony_ci
35c5f01b2fSopenharmony_ci# uninstall the virtual environment
36c5f01b2fSopenharmony_ciuninstall_venv: clean
37c5f01b2fSopenharmony_ci	rm -fr venv
38