Skip to content

Commit

Permalink
Add ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
adikhoff committed Oct 25, 2024
1 parent 786844e commit 25f3bbb
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,11 @@ SPHINX_DIR="_sphinx"
REPO_DIR="_repo"

LIVE_ROOT="redot-docs-live"
LIVE_REPO="https://github.com/Redot-Engine/$LIVE_ROOT.git"
LIVE_REPO="git@github.com:Redot-Engine/$LIVE_ROOT.git"
BUILD_DIR="html/en/$GIT_BRANCH"

echo "###############################"
git config --list

WORK_DIR=`pwd`

echo $BUILD_SSH_KEY > $WORK_DIR/id_rsa

cat $WORK_DIR/id_rsa

git config core.sshCommand 'ssh -i $WORK_DIR/id_rsa' #specific private key

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

mkdir -p $REPORT_DIR
rm $REPORT_FILE
Expand Down Expand Up @@ -67,8 +58,12 @@ 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 "Setting credentials"
git config --global user.email "[email protected]"
git config --global user.name "CloudFlare bot"
echo $BUILD_SSH_KEY > $WORK_DIR/id_priv
git config core.sshCommand 'ssh -i $WORK_DIR/id_priv'
git config --global user.email "[email protected]"
git config --global user.name "Cloudflare build worker"

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
Expand Down

0 comments on commit 25f3bbb

Please sign in to comment.