forked from godotengine/godot-docs
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arjan Dikhoff
committed
Oct 25, 2024
1 parent
c3441a0
commit d82a324
Showing
1 changed file
with
12 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,18 @@ DATE=`date` | |
WORK_DIR=`pwd` | ||
REPORT_DIR="$WORK_DIR/build-report" | ||
REPORT_FILE="$REPORT_DIR/index.html" | ||
SSH_COMMAND="ssh -v" | ||
|
||
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` | ||
if [ -n "$CF_PAGES" ] | ||
then | ||
echo "We are on Cloudflare Pages. Retrieve branch from env." | ||
GIT_BRANCH=$CF_PAGES_BRANCH | ||
|
||
echo "Remove Cloudflare redirect." | ||
# HACK: Remove annoying https redirect. I presume this was used by Cloudflare | ||
insteadof=`git config --list | grep insteadof` | ||
remove=`echo $insteadof | cut -d "=" -f 1` | ||
git config --global --unset $remove | ||
fi | ||
GIT_COMMIT_MESSAGE="branch $GIT_BRANCH on $DATE" | ||
GIT_LIVE_BRANCH=${2:-develop} | ||
|
@@ -60,7 +65,10 @@ cd $REPO_DIR | |
echo "Checking out $GIT_LIVE_BRANCH" | ||
git checkout $GIT_LIVE_BRANCH | ||
|
||
SSH_COMMAND="ssh" # Add -v, -vv, or -vvv for verbose debugging | ||
git config --global core.sshCommand "$SSH_COMMAND" | ||
echo "Using ssh command: $SSH_COMMAND" | ||
|
||
if [ -n "$CF_PAGES" ] | ||
then | ||
echo "We are on Cloudflare Pages. Setting custom ssh key and method" | ||
|
@@ -74,30 +82,18 @@ then | |
chmod 0644 ~/.ssh/known_hosts | ||
chmod 0755 ~/.ssh | ||
|
||
#git config --global remote.origin.url [email protected]:Redot-Engine/redot-docs-live.git | ||
|
||
# HACK: remove annoying https redirect | ||
insteadof=`git config --list | grep insteadof` | ||
remove=`echo $insteadof | cut -d "=" -f 1` | ||
git config --global --unset $remove | ||
|
||
git remote set-url origin [email protected]:Redot-Engine/redot-docs-live.git | ||
|
||
echo "Setting credentials" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Redot Docs Build Worker" | ||
fi | ||
echo "#########################" | ||
cat .git/config | ||
echo "#########################" | ||
ls -la ~/.ssh | ||
cat ~/.ssh/id_ed25519.pub | ||
cat ~/.ssh/known_hosts | ||
ssh -T [email protected] | ||
echo "#########################" | ||
|
||
echo "### GIT CONFIG VALUES ###" | ||
git config --global core.pager cat | ||
git config --list | ||
|
||
echo "Copying generated content to repository" | ||
echo "mkdir -p $BUILD_DIR" | ||
mkdir -p $BUILD_DIR | ||
echo "cp -r ../$SPHINX_DIR/* $BUILD_DIR" | ||
|