Skip to content

Commit 8726536

Browse files
committed
Add Makefile commands for building and serving documentation
1 parent f8896df commit 8726536

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ The configuration is stored in the `docs` directory. The default settings in `do
3131
To build the documentation as a bundle of HTML files, run the following command:
3232

3333
```zsh
34-
cd docs && uv run make html
34+
make build-docs
3535
```
3636

3737
You can launch a preview site with the following command:
3838

3939
```zsh
40-
cd docs && uv run make livehtml
40+
make serve-docs
4141
```
4242

4343
The documentation site is automatically built by a [GitHub Actions workflow](https://github.com/palewire/python-open-source-template/blob/main/.github/workflows/docs.yaml) that runs on every push to the repository. If you provide the proper credentials, it will also automatically publish the documentation to an Amazon S3 bucket after a push to the main branch.

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ PYTHON := python -W ignore -m
6666
# Commands
6767
#
6868

69+
build-docs: ## Build the docs
70+
$(call banner, 📚 Building docs 📚)
71+
@rm -rf _build/
72+
@rm -rf docs/_build
73+
@cd docs && $(UV) make html
74+
6975
serve-docs: ## Test the site
7076
$(call banner, 🧪 Serving test site 🧪)
7177
@rm -rf _build/

0 commit comments

Comments
 (0)