Improve Docs publish.yml workflow dispatch (#17039)
This commit is contained in:
parent
ab697b327b
commit
e38228774f
1 changed files with 6 additions and 1 deletions
7
.github/workflows/docs.yml
vendored
7
.github/workflows/docs.yml
vendored
|
|
@ -20,6 +20,11 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
publish_docs:
|
||||||
|
description: 'Publish live to https://docs.ultralytics.com'
|
||||||
|
default: 'true'
|
||||||
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Docs:
|
Docs:
|
||||||
|
|
@ -80,7 +85,7 @@ jobs:
|
||||||
echo "No changes to commit"
|
echo "No changes to commit"
|
||||||
fi
|
fi
|
||||||
- name: Publish Docs to https://docs.ultralytics.com
|
- 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: |
|
run: |
|
||||||
git clone https://github.com/ultralytics/docs.git docs-repo
|
git clone https://github.com/ultralytics/docs.git docs-repo
|
||||||
cd docs-repo
|
cd docs-repo
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue