mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
update update_website.sh to push result back to github
This commit is contained in:
parent
dc540d601e
commit
5f84e42bef
1 changed files with 18 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
REPO=git://github.com/bitcoin/bitcoin.org.git
|
||||
DESTREPO=git@github.com:bitcoin/bitcoin.github.com.git
|
||||
WORKDIR=/tmp/bitcoin.org/
|
||||
DESTDIR=/var/www/
|
||||
|
||||
|
@ -13,14 +14,27 @@ fi
|
|||
cd $WORKDIR
|
||||
|
||||
git pull origin master
|
||||
|
||||
git reset --hard
|
||||
|
||||
git clean -x -f -d
|
||||
|
||||
mkdir _site/
|
||||
|
||||
jekyll
|
||||
|
||||
rsync --delete -a $WORKDIR/_site/ $DESTDIR
|
||||
if test ! -d $DESTDIR/.git/; then
|
||||
rm -r $DESTDIR/*
|
||||
git clone $DESTREPO $DESTDIR
|
||||
fi
|
||||
|
||||
COMMITMSG="jekyll build on `date -R` from `git log --oneline|head -n1`"
|
||||
|
||||
cd $DESTDIR
|
||||
|
||||
git pull origin master
|
||||
git reset --hard
|
||||
git clean -x -f -d
|
||||
|
||||
rsync --exclude=.git/ --delete -a $WORKDIR/_site/ $DESTDIR
|
||||
|
||||
git add .
|
||||
git commit -a -m "$COMMITMSG"
|
||||
git push origin master
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue