Skip to content

Commit 9901480

Browse files
authored
Merge pull request #4 from teogor/fix/docs
Updated SyncDocs
2 parents 2006987 + 8d05a11 commit 9901480

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

.github/workflows/sync-docs/sync-files.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ git config --global user.name "$USER_NAME"
3030
git 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

3535
if [ ! -z "$RENAME" ]; then
3636
echo "Renaming file to: ${RENAME}"
@@ -46,15 +46,8 @@ fi
4646
# Copy the source file to the destination repository
4747
echo "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
6053
cd "$CLONE_DIR"

0 commit comments

Comments
 (0)