File tree Expand file tree Collapse file tree
.github/workflows/sync-docs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ git config --global user.name "$USER_NAME"
3030git clone --single-branch --branch $DESTINATION_BRANCH " https://x-access-token:$API_TOKEN_GITHUB @$GIT_SERVER /$DESTINATION_REPO .git" " $CLONE_DIR "
3131
3232# Determine the destination file path
33- DEST_COPY=" $CLONE_DIR /$DESTINATION_FOLDER "
33+ DEST_COPY=" $CLONE_DIR /$DESTINATION_FOLDER / "
3434
3535if [ ! -z " $RENAME " ]; then
3636 echo " Renaming file to: ${RENAME} "
4646# Copy the source file to the destination repository
4747echo " Copying contents to Git repo: $SOURCE_FILE "
4848
49- mkdir -p $CLONE_DIR /$DESTINATION_FOLDER
50-
51- if [ -z " $USE_RSYNC " ]; then
52- echo " Copying using cp"
53- cp -R " $SOURCE_FILE " " $DEST_COPY "
54- else
55- echo " Copying using rsync"
56- rsync -avrh " $SOURCE_FILE " " $DEST_COPY "
57- fi
49+ # Move the source file instead of copying it to avoid creating duplicates
50+ cp -r " $SOURCE_FILE " " $DEST_COPY "
5851
5952# Check out the specified branch or create a new one
6053cd " $CLONE_DIR "
You can’t perform that action at this time.
0 commit comments