Skip to content

Commit

Permalink
Try different command tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjan Dikhoff committed Oct 25, 2024
1 parent 4708e87 commit e048c00
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REPORT_FILE="$REPORT_DIR/index.html"
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
if [ $CF_PAGES -gt 0 ]
then
echo "We are on pages"
echo "We are on Cloudflare Pages. Retrieve branch from env."
GIT_BRANCH=$CF_PAGES_BRANCH
fi
GIT_COMMIT_MESSAGE="branch $GIT_BRANCH on $DATE"
Expand All @@ -23,8 +23,6 @@ LIVE_REPO="[email protected]:Redot-Engine/$LIVE_ROOT.git"
BUILD_DIR="html/en/$GIT_BRANCH"
WORK_DIR=`pwd`

echo "###############################"

mkdir -p $REPORT_DIR
rm $REPORT_FILE
echo "reporting to $REPORT_FILE" 2>&1 | tee -a $REPORT_FILE
Expand All @@ -46,11 +44,15 @@ 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 ssh key"
echo $BUILD_SSH_KEY > $WORK_DIR/id_priv
SSH_COMMAND="ssh -vvv -i $WORK_DIR/id_priv"
echo $SSH_COMMAND
git config --global core.sshcommand "$SSH_COMMAND"
if [ $CF_PAGES -gt 0 ]
then
echo "We are on Cloudflare Pages. Setting custom ssh key and method"
echo $BUILD_SSH_KEY > $WORK_DIR/id_priv
SSH_COMMAND="ssh -vvv -i $WORK_DIR/id_priv"
echo $SSH_COMMAND
git config --global core.sshCommand "$SSH_COMMAND"
fi

echo "Cloning $LIVE_REPO $REPO_DIR"
git clone $LIVE_REPO $REPO_DIR 2>&1 | tee -a $REPORT_FILE
echo "Checking out $GIT_LIVE_BRANCH"
Expand Down

0 comments on commit e048c00

Please sign in to comment.