Skip to content

Commit d3ec828

Browse files
committed
Added a script to update docs
1 parent cd254dd commit d3ec828

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,21 @@ When updating the Python version requirement, update the following files:
115115
Create new release on Github, then Github Actions automatically uploads the
116116
module to PyPI.
117117

118+
## How to update bundled documentation
119+
120+
The product documentation lives in `smart_tests/docs/` and is bundled into the
121+
distributed package. To pull in the latest from the docsite repository:
122+
123+
```shell
124+
uv run poe update-docs
125+
```
126+
127+
Users can extract the bundled docs to the current directory with:
128+
129+
```shell
130+
smart-tests get docs
131+
```
132+
118133
## How to update smart_tests/jar/exe_deploy.jar
119134

120135
```

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ lint-warn = "flake8 --count --exit-zero --max-complexity=15 --max-line-length=13
5252
test = "python -m unittest"
5353
test-xml = "python -m test-runner"
5454
type = "mypy smart_tests tests"
55+
update-docs = "bash scripts/update_docs.sh"
5556

5657
[build-system]
5758
requires = ["setuptools>=45", "wheel", "setuptools_scm"]

scripts/update_docs.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# Fetch the latest docs from the docsite repository into smart_tests/docs/.
3+
# Run via: uv run poe update-docs
4+
set -euo pipefail
5+
6+
REPO="git@github.com:cloudbees/docsite-cloudbees-smart-tests.git"
7+
DOCS_DST="$(dirname "$0")/../smart_tests/docs"
8+
9+
tmpdir=$(mktemp -d)
10+
trap 'rm -rf "$tmpdir"' EXIT
11+
12+
git clone --depth=1 "$REPO" "$tmpdir"
13+
rm -rf "$DOCS_DST"
14+
cp -r "$tmpdir/docs" "$DOCS_DST"
15+
echo "Docs updated at $DOCS_DST"

0 commit comments

Comments
 (0)