tools: add op docs command (#38770)

This commit is contained in:
Adeeb Shihadeh
2026-09-04 15:20:43 -07:00
committed by GitHub
parent e3def37695
commit 675ff56981
3 changed files with 11 additions and 8 deletions
+2 -6
View File
@@ -26,16 +26,12 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: commaai/timeout@v1
- uses: actions/checkout@v7
with:
submodules: true
- run: ./tools/op.sh setup
# Build
- name: Build docs
run: |
git lfs pull
python docs/serve.py --build
run: ./tools/op.sh docs --build
# Push to docs.comma.ai
- uses: actions/checkout@v7
+2 -2
View File
@@ -5,10 +5,10 @@ The site is updated on pushes to master by this [workflow](../.github/workflows/
**1. Build the site**
``` bash
python docs/serve.py --build
op docs --build
```
**2. Run the site locally** (rebuilds on change)
``` bash
python docs/serve.py
op docs
```
+7
View File
@@ -349,6 +349,11 @@ function op_clip() {
op_run_command openpilot/tools/clip/run.py "$@"
}
function op_docs() {
op_before_cmd
op_run_command python docs/serve.py "$@"
}
function op_check_agnos_update() {
if [[ ! -f "/AGNOS" ]]; then
return 0
@@ -447,6 +452,7 @@ function op_default() {
echo -e " ${BOLD}replay${NC} Run Replay"
echo -e " ${BOLD}cabana${NC} Run Cabana"
echo -e " ${BOLD}clip${NC} Run clip (linux only)"
echo -e " ${BOLD}docs${NC} Build or serve the openpilot documentation"
echo -e " ${BOLD}adb${NC} Run adb shell"
echo -e " ${BOLD}ssh${NC} comma prime SSH helper"
echo ""
@@ -502,6 +508,7 @@ function _op() {
test ) shift 1; op_test "$@" ;;
replay ) shift 1; op_replay "$@" ;;
clip ) shift 1; op_clip "$@" ;;
docs ) shift 1; op_docs "$@" ;;
sim ) shift 1; op_sim "$@" ;;
switch ) shift 1; op_switch "$@" ;;
start ) shift 1; op_start "$@" ;;