File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 77 description : " Use nightly builds inside build.sh"
88 required : false
99 type : number
10- default : false
10+ default : 0
11+ UPLOAD_MAIN :
12+ description : " Upload built docs to main site"
13+ required : false
14+ type : number
15+ default : 0
1116
1217concurrency :
1318 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
@@ -150,6 +155,7 @@ jobs:
150155 COMMIT_SOURCE : ${{ github.ref }}
151156 GITHUB_PYTORCHBOT_TOKEN : ${{ secrets.PYTORCHBOT_TOKEN }}
152157 USE_NIGHTLY : ${{ inputs.USE_NIGHTLY }}
158+ UPLOAD_MAIN : ${{ inputs.UPLOAD_MAIN }}
153159 run : |
154160 set -ex
155161
@@ -164,6 +170,7 @@ jobs:
164170 -e COMMIT_SOURCE \
165171 -e GITHUB_PYTORCHBOT_TOKEN \
166172 -e USE_NIGHTLY \
173+ -e UPLOAD_MAIN \
167174 --env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
168175 --tty \
169176 --detach \
Original file line number Diff line number Diff line change 1616 secrets : inherit
1717 with :
1818 USE_NIGHTLY : 1
19+ UPLOAD_MAIN : 0
Original file line number Diff line number Diff line change 1616 secrets : inherit
1717 with :
1818 USE_NIGHTLY : 0
19+ UPLOAD_MAIN : 1
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ elif [[ "${JOB_TYPE}" == "manager" ]]; then
154154 awsv2 s3 cp manager.7z s3://${BUCKET_NAME} /${COMMIT_ID} /manager.7z
155155
156156 # Step 7: push new HTML files and static files to gh-pages
157- if [[ " $COMMIT_SOURCE " == " refs/heads/master" || " $COMMIT_SOURCE " == " refs/heads/main" ]]; then
157+ if [[ " $UPLOAD_MAIN " == 1 && ( " $ COMMIT_SOURCE" == " refs/heads/master" || " $COMMIT_SOURCE " == " refs/heads/main" ) ]]; then
158158 git clone https://github.com/pytorch/tutorials.git -b gh-pages gh-pages
159159 # Clean up directories that contain tutorials
160160
You can’t perform that action at this time.
0 commit comments