forked from Hostea/website
fix: commit only when website has been updated
parent
db1e89cd70
commit
ef4b79ab75
|
@ -56,7 +56,8 @@ set_ssh_remote() {
|
||||||
repository_owner=$(echo $http_remote_url | cut -d '/' -f 4)
|
repository_owner=$(echo $http_remote_url | cut -d '/' -f 4)
|
||||||
repository_name=$(echo $http_remote_url | cut -d '/' -f 5)
|
repository_name=$(echo $http_remote_url | cut -d '/' -f 5)
|
||||||
ssh_remote="git@$remote_hostname:$repository_owner/$repository_name"
|
ssh_remote="git@$remote_hostname:$repository_owner/$repository_name"
|
||||||
git remote add $SSH_REMOTE_NAME $ssh_remote || true
|
ssh_remote="git@gitea.hostea.org:Hostea/website.git"
|
||||||
|
git remote add $SSH_REMOTE_NAME $ssh_remote
|
||||||
}
|
}
|
||||||
|
|
||||||
clean() {
|
clean() {
|
||||||
|
|
|
@ -112,7 +112,7 @@ deploy() {
|
||||||
/bin/rm -rf *
|
/bin/rm -rf *
|
||||||
cp -r $tmp_dir/* .
|
cp -r $tmp_dir/* .
|
||||||
git add --all
|
git add --all
|
||||||
if [ -n $(git status --porcelain) ];
|
if [ $(git status --porcelain | xargs | sed '/^$/d' | wc -l) -gt 0 ];
|
||||||
then
|
then
|
||||||
echo "[*] Repository has changed, committing changes"
|
echo "[*] Repository has changed, committing changes"
|
||||||
git commit \
|
git commit \
|
||||||
|
|
Loading…
Reference in New Issue