fix: commit only when website has been updated
ci/woodpecker/push/woodpecker Pipeline failed Details

pull/6/head
Aravinth Manivannan 2022-04-16 13:28:27 +05:30
parent db1e89cd70
commit ef4b79ab75
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
2 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,8 @@ set_ssh_remote() {
repository_owner=$(echo $http_remote_url | cut -d '/' -f 4)
repository_name=$(echo $http_remote_url | cut -d '/' -f 5)
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() {

View File

@ -112,7 +112,7 @@ deploy() {
/bin/rm -rf *
cp -r $tmp_dir/* .
git add --all
if [ -n $(git status --porcelain) ];
if [ $(git status --porcelain | xargs | sed '/^$/d' | wc -l) -gt 0 ];
then
echo "[*] Repository has changed, committing changes"
git commit \