Improve Docs publish.yml workflow dispatch (#17039)

This commit is contained in:
Glenn Jocher 2024-10-20 00:54:30 +02:00 committed by GitHub
parent ab697b327b
commit e38228774f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,6 +20,11 @@ on:
pull_request:
branches: [main]
workflow_dispatch:
inputs:
publish_docs:
description: 'Publish live to https://docs.ultralytics.com'
default: 'true'
type: boolean
jobs:
Docs:
@ -80,7 +85,7 @@ jobs:
echo "No changes to commit"
fi
- name: Publish Docs to https://docs.ultralytics.com
if: github.event_name == 'push'
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_docs == 'true')
run: |
git clone https://github.com/ultralytics/docs.git docs-repo
cd docs-repo