-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
66 lines (54 loc) · 2.02 KB
/
docs.yml
File metadata and controls
66 lines (54 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# name: Deploy MkDocs Docs
# on:
# push:
# branches: [master]
# permissions:
# contents: write
# jobs:
# deploy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Install MkDocs and plugins
# run: |
# python -m pip install --upgrade pip setuptools wheel uv
# uv sync --group dev --group test --group docs
# - name: Symlink README into docs
# run: cp --remove-destination README.md docs/index.md
# - name: Extract code examples (with section titles) from README
# run: |
# cat <<'AWK' > /tmp/extract_examples.awk
# /^##[[:space:]]*.*Code Examples/ { insec=1; next }
# insec && /^##[[:space:]]/ { exit }
# insec {
# # capture text inside <summary> ... </summary>
# if ($0 ~ /<summary>/) {
# t=$0
# sub(/.*<summary>[[:space:]]*/, "", t)
# sub(/[[:space:]]*<\/summary>.*/, "", t)
# title=t
# }
# # start of fenced code block
# if ($0 ~ /^[[:space:]]*```(bash|python)/) {
# if (title != "") { print "# " title }
# code=1; print; next
# }
# # end of fenced code block
# if (code && $0 ~ /^[[:space:]]*```[[:space:]]*$/) { code=0; print; next }
# if (code) print
# }
# AWK
# awk -f /tmp/extract_examples.awk README.md > docs/quickstart.md
# - name: Expose project on PYTHONPATH
# run: echo "PYTHONPATH=${GITHUB_WORKSPACE}" >> "$GITHUB_ENV"
# - name: Deploy to GitHub Pages
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# source .venv/bin/activate
# git config --local user.email yolov5.deepsort.pytorch@gmail.com
# git config --local user.name mikel-brostrom
# mkdocs gh-deploy --clean --force --verbose