From e38228774f6833caed21cf0d5d2365e93ff9f33c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 20 Oct 2024 00:54:30 +0200 Subject: [PATCH] Improve Docs publish.yml workflow dispatch (#17039) --- .github/workflows/docs.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5c8baafc0a..37e99b618d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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