diff --git a/.jenkins/build.sh b/.jenkins/build.sh index 58483c168b5..9162152ff78 100755 --- a/.jenkins/build.sh +++ b/.jenkins/build.sh @@ -151,6 +151,12 @@ elif [[ "${JOB_TYPE}" == "manager" ]]; then # Step 7: push new HTML files and static files to gh-pages if [[ "$COMMIT_SOURCE" == "refs/heads/master" || "$COMMIT_SOURCE" == "refs/heads/main" ]]; then git clone https://github.com/pytorch/tutorials.git -b gh-pages gh-pages + # Clean up directories that contain tutorials + + for dir in beginner intermediate prototype recipes advanced distributed vision text audio; do + rm -rf "gh-pages/$dir" + done + cp -r docs/* gh-pages/ pushd gh-pages # DANGER! DO NOT REMOVE THE `set +x` SETTING HERE!