diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 3a452a239309312f43c4d65e661fd50df4e0a55c..1a3495bb651f9dbe95db4948a944ac9dbe59e5a3 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -12,11 +12,7 @@ jobs:
         uses: actions/checkout@v2
       - name: Install dependencies
         run: sudo apt update && sudo apt install -y python3-pip
-      - name: Install latest jinja2 version
-        run: pip3 install jinja2
-      - name: Install mkdocs
-        run: pip3 install mkdocs mkdocs-material mkdocs-minify-plugin
-      - name: Build docs
+      - name: Build docs (required for tests)
         run: make docs
       - name: Run tests, formatting, vetting and linting
         run: make check
diff --git a/Makefile b/Makefile
index 142db10fe9211755b2237a1a64c3a0f843066d90..4b9a344793037283a3a7ed69fc03a96a15451cf5 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,10 @@ help:
 
 
 # Documentation
-docs: .PHONY
+docs-deps: .PHONY
+	pip3 install -r requirements.txt
+
+docs: docs-deps
 	mkdocs build
 
 # Test/check targets
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..246f89235babf1a9192858b0fe33cd72c5bfa62e
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,9 @@
+# The documentation uses 'mkdocs', which is written in Python
+
+# See https://github.com/squidfunk/mkdocs-material/issues/2030
+jinja2>=2.11.1
+
+# mkdocs
+mkdocs
+mkdocs-material
+mkdocs-minify-plugin