Skip to content

Commit

Permalink
Change clone command
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjan Dikhoff committed Oct 25, 2024
1 parent d5f3527 commit c4e824e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ echo "Translate to html"
mkdir -p $SPHINX_DIR
sphinx-build -b html -j 4 $MIGRATE_DIR $SPHINX_DIR 2>&1 | tee -a $REPORT_FILE

echo "Setting credentials"
echo "Setting ssh key"
echo $BUILD_SSH_KEY > $WORK_DIR/id_priv
SSH_COMMAND="ssh -i $WORK_DIR/id_priv"
echo $SSH_COMMAND
git config core.sshCommand "$SSH_COMMAND"

echo "Cloning $LIVE_REPO $REPO_DIR"
git clone $LIVE_REPO $REPO_DIR 2>&1 | tee -a $REPORT_FILE
git -c core.sshCommand="$SSH_COMMAND" clone $LIVE_REPO $REPO_DIR 2>&1 | tee -a $REPORT_FILE

echo "Checking out $GIT_LIVE_BRANCH"
cd $REPO_DIR
Expand All @@ -63,12 +61,13 @@ mkdir -p $BUILD_DIR
echo "cp -r ../$SPHINX_DIR/* $BUILD_DIR" 2>&1 | tee -a ../$REPORT_FILE
cp -r ../$SPHINX_DIR/* $BUILD_DIR 2>&1 | tee -a ../$REPORT_FILE

echo "Commit and push to $GIT_LIVE_BRANCH, with message $GIT_COMMIT_MESSAGE" 2>&1 | tee -a ../$REPORT_FILE
echo "Setting credentials"
git config user.email "[email protected]"
git config user.name "Cloudflare build worker"
git config core.pager cat
git config --list

echo "Commit and push to $GIT_LIVE_BRANCH, with message $GIT_COMMIT_MESSAGE" 2>&1 | tee -a ../$REPORT_FILE
git add . 2>&1 | tee -a ../$REPORT_FILE
git commit -m "$GIT_COMMIT_MESSAGE" 2>&1 | tee -a ../$REPORT_FILE
git push -f 2>&1 | tee -a ../$REPORT_FILE
Expand Down

0 comments on commit c4e824e

Please sign in to comment.