From b714f3ddb1abed1b6a2c41fb3422bc917c86b47a Mon Sep 17 00:00:00 2001 From: Rafal Chlodnicki Date: Fri, 26 Jan 2024 21:35:47 +0100 Subject: [PATCH] chore: deploy docs preview on docs changes --- .github/workflows/docs.yml | 4 ++-- docs/Makefile | 15 +++++++++++++++ netlify.toml | 6 ++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 docs/Makefile create mode 100644 netlify.toml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3cf0eb632..48ba78440 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x - - run: pip install mkdocs-material mkdocs-redirects - run: | cd docs - mkdocs gh-deploy --force + make install + make deploy diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000..810cb028b --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,15 @@ +# Minimal makefile for Sphinx documentation + +.PHONY: clean + +install: + pip install mkdocs mkdocs-material mkdocs-redirects + +build: + mkdocs build + +deploy: + mkdocs gh-deploy --force + +clean: + rm -rf site diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000..b3b77b33c --- /dev/null +++ b/netlify.toml @@ -0,0 +1,6 @@ +# https://docs.netlify.com/configure-builds/file-based-configuration + +[build] + base = "docs/" + publish = "site/" + command = "make install && make build"