Skip to content

Commit 2ce8dbb

Browse files
authored
feat(docs): build all docs at once (#19117)
# Overview Add to `Makefile` and update `uv` config so you can build the omnibus docs site. ## Test Plan and Hands on Testing Tested locally: - `make -C docs build` - `make -C docs serve` Tested CI for this PR and it works. <img width="2782" height="2002" alt="Screenshot 2025-08-04 at 4 45 04 PM" src="https://github.com/user-attachments/assets/eb7b06d7-975c-46fa-998c-0a977814a84e" /> ## Changelog - Three new `make` commands. - Add `mkdocs-monorepo-plugin` to requirements. - Have the CI workflow use the new commands. ## Review requests Any bad patterns or things we should fix here? How do we get this using the `sandbox.docs.opentrons.com` domain instead of a plain S3 URL? ## Risk assessment low-med, messing with CI.
1 parent 12d5d9d commit 2ce8dbb

File tree

4 files changed

+60
-8
lines changed

4 files changed

+60
-8
lines changed

.github/workflows/docs-build-deploy.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defaults:
2020
shell: bash
2121

2222
jobs:
23-
sandbox-build-and-deploy-flex-manual:
23+
sandbox-build-and-deploy-mkdocs-site:
2424
timeout-minutes: 5
2525
runs-on: 'ubuntu-24.04'
2626
permissions:
@@ -45,13 +45,13 @@ jobs:
4545
- name: Sync the project
4646
working-directory: ./docs
4747
run: make setup
48-
- name: Build Flex Manual
48+
- name: Build Docs Site
4949
working-directory: ./docs
50-
run: make build-flex-manual
51-
- name: Deploy Flex Manual to Sandbox
50+
run: make build
51+
- name: Deploy Docs Site to Sandbox
5252
working-directory: ./docs
53-
run: make deploy-flex-manual BRANCH=${{ env.BRANCH }}
53+
run: make deploy BRANCH=${{ env.BRANCH }}
5454
- name: Output URL to Summary
5555
run: |
56-
echo "## Flex Manual deployed to sandbox" >> $GITHUB_STEP_SUMMARY
57-
echo "<http://sandbox.docs.s3-website.us-east-2.amazonaws.com/${{ env.BRANCH }}/flex-manual/>" >> $GITHUB_STEP_SUMMARY
56+
echo "## Docs site deployed to sandbox" >> $GITHUB_STEP_SUMMARY
57+
echo "<http://sandbox.docs.s3-website.us-east-2.amazonaws.com/${{ env.BRANCH }}/>" >> $GITHUB_STEP_SUMMARY

docs/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ SANDBOX_S3_BUCKET ?= sandbox.docs
77
setup:
88
uv sync
99

10+
.PHONY: serve
11+
serve:
12+
uv run mkdocs serve -f ./mkdocs.yml
13+
14+
.PHONY: build
15+
build:
16+
uv run mkdocs build -f ./mkdocs.yml
17+
18+
.PHONY: deploy
19+
deploy:
20+
@if [ -n "$$CI" ]; then \
21+
echo "If you need to run this locally, set the variable AWS_PROFILE."; \
22+
fi
23+
aws s3 sync ./site/ s3://$(SANDBOX_S3_BUCKET)/$(BRANCH)/ --acl public-read $(if $(AWS_PROFILE),--profile $(AWS_PROFILE))
24+
1025
.PHONY: serve-flex-manual
1126
serve-flex-manual:
1227
uv run mkdocs serve -f $(FLEX_MANUAL_PREFIX)/mkdocs.yml

docs/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies = [
88
"mkdocs>=1.6.1",
99
"mkdocs-autorefs>=1.4.2",
1010
"mkdocs-material>=9.6.14",
11+
"mkdocs-monorepo-plugin>=1.1.2",
1112
"mkdocs-parent-css-plugin",
1213
]
1314

docs/uv.lock

Lines changed: 37 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)