travis: Trying to get pushing working.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
955f378f0e
commit
6de2250133
|
|
@ -1,6 +1,7 @@
|
|||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ ! -d html ]; then
|
||||
echo "Please generate the html files first."
|
||||
|
|
@ -21,10 +22,17 @@ TMPDIR=$(mktemp -d)
|
|||
cd $TMPDIR
|
||||
|
||||
# Clone the destination
|
||||
git clone git+ssh://github.com/$CURRENT_OWNER/prjxray-db.git --reference $SRCDIR/.git -b gh-pages html
|
||||
echo
|
||||
echo "Cloning GitHub pages"
|
||||
echo "--------------------------------------------"
|
||||
ssh-add -l
|
||||
ssh -v github.com || true
|
||||
git clone git+ssh://git@github.com/$CURRENT_OWNER/prjxray-db.git --reference $SRCDIR/.git -b gh-pages html
|
||||
echo "--------------------------------------------"
|
||||
(
|
||||
cd html
|
||||
git fetch
|
||||
git log -1
|
||||
find -type f | sort
|
||||
)
|
||||
rm -rf html/*
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,17 @@ if [ ! -z "$GH_KEY" ]; then
|
|||
ssh-agent > ~/.ssh/agent.sh
|
||||
. ~/.ssh/agent.sh
|
||||
mkdir -p ~/.ssh/
|
||||
echo "$GH_KEY" | base64 -d > ~/.ssh/id_rsa
|
||||
chmod 0400 ~/.ssh/id_rsa
|
||||
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
|
||||
ssh-add ~/.ssh/id_rsa
|
||||
echo "$GH_KEY" | base64 -d > ~/.ssh/id_git
|
||||
chmod 0400 ~/.ssh/id_git
|
||||
ssh-keygen -y -f ~/.ssh/id_git > ~/.ssh/id_git.pub
|
||||
ssh-add ~/.ssh/id_git
|
||||
cat > ~/.ssh/config <<EOF
|
||||
Host github.com
|
||||
User git
|
||||
IdentityFile ~/.ssh/id_git
|
||||
LogLevel ERROR
|
||||
EOF
|
||||
|
||||
echo "Got ssh key $(ssh-add -l -E md5)"
|
||||
else
|
||||
echo "No ssh key."
|
||||
|
|
|
|||
Loading…
Reference in New Issue