Skip to content

Commit efd3430

Browse files
svekarsmalfet
andauthored
Cleanup directories before pushing to gh-pages (#3408)
* Cleanup directories before pushing to gh-pages --------- Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
1 parent e2a51c8 commit efd3430

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.jenkins/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ elif [[ "${JOB_TYPE}" == "manager" ]]; then
151151
# Step 7: push new HTML files and static files to gh-pages
152152
if [[ "$COMMIT_SOURCE" == "refs/heads/master" || "$COMMIT_SOURCE" == "refs/heads/main" ]]; then
153153
git clone https://github.com/pytorch/tutorials.git -b gh-pages gh-pages
154+
# Clean up directories that contain tutorials
155+
156+
for dir in beginner intermediate prototype recipes advanced distributed vision text audio; do
157+
rm -rf "gh-pages/$dir"
158+
done
159+
154160
cp -r docs/* gh-pages/
155161
pushd gh-pages
156162
# DANGER! DO NOT REMOVE THE `set +x` SETTING HERE!

0 commit comments

Comments
 (0)