Auto-update Docs Reference section action (#13127)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
2e65e6fcb3
commit
627453c26a
15 changed files with 116 additions and 37 deletions
17
.github/workflows/ci.yaml
vendored
17
.github/workflows/ci.yaml
vendored
|
|
@ -43,6 +43,9 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref || github.ref }}
|
||||
fetch-depth: 0
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
|
|
@ -50,6 +53,20 @@ jobs:
|
|||
cache: "pip" # caching pip dependencies
|
||||
- name: Install Dependencies
|
||||
run: pip install tqdm mkdocs-material "mkdocstrings[python]" mkdocs-jupyter mkdocs-redirects mkdocs-ultralytics-plugin
|
||||
- name: Update Docs Reference Section
|
||||
run: python docs/build_reference.py
|
||||
- name: Commit and Push Changes
|
||||
run: |
|
||||
git add .
|
||||
git reset HEAD -- .github/workflows/ # workflow changes are not permitted with default token
|
||||
if ! git diff --staged --quiet; then
|
||||
git config --global user.name "UltralyticsAssistant"
|
||||
git config --global user.email "web@ultralytics.com"
|
||||
git commit -m "Auto-update Ultralytics Docs by https://ultralytics.com/actions"
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
||||
- name: Build Docs and Check for Warnings
|
||||
run: python docs/build_docs.py
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue