fix update script
This commit is contained in:
parent
cba2a45bad
commit
c12074eb0b
1 changed files with 9 additions and 6 deletions
|
@ -83,13 +83,12 @@ In my home directory I defined two hook scripts:
|
|||
[[ "$1" == *".."* ]] && exit 1;
|
||||
[[ "$1" == *"*"* ]] && exit 1;
|
||||
if [ -d "/var/www/$1" ]; then
|
||||
git clone -b gh-pages --single-branch "$2" "$1" || exit 1;
|
||||
exit;
|
||||
cd "/var/www/$1";
|
||||
git fetch origin gh-pages;
|
||||
git reset --hard origin/gh-pages;
|
||||
exit;
|
||||
fi;
|
||||
cd "/var/www/$1";
|
||||
git fetch origin gh-pages;
|
||||
git reset --hard origin/gh-pages;
|
||||
exit;
|
||||
git clone -b gh-pages --single-branch "$2" "$1" || exit 1;
|
||||
```
|
||||
|
||||
`~/webhooks/remove-pages.sh`
|
||||
|
@ -123,6 +122,10 @@ Also make sure to replace your execute-command lines with ones referencing your
|
|||
"source": "payload",
|
||||
"name": "repository.name"
|
||||
},
|
||||
{
|
||||
"source": "payload",
|
||||
"name": "repository.clone_url"
|
||||
},
|
||||
],
|
||||
"trigger-rule":
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue