The automated execution of GitLab CI/CD pipelines is not functioning as expected after a code push

The automated execution of GitLab CI/CD pipelines is not functioning as expected after a code push

.gitlab-ci.yml
default:
tags:
- java

stages:

  • build
  • deploy

gradlebuild:
stage: build
only:
- master
script:
- gradle clean build -x test
artifacts:
paths:
- build/libs/.jar
#Deploy stage
deploy-master:
tags:
- java
before_script:
- echo “Host= $HOST”
stage: deploy
only:
- master
script:
- sshpass -V
- export SSHPASS=$PASSWORD
- sshpass -e scp pipelines/script/
$USER@$HOST:$workdir
- sshpass -e ssh $USER@$HOST ‘cd /integration/ && chmod +x process.sh && sh process.sh’
- sshpass -e scp build/libs/mfs-integration-*.jar $USER@$HOST:$workdir
- sshpass -e ssh $USER@$HOST ‘cd /integration/ && chmod +x dscript.sh && sh dscript.sh’

Where have I missed? Triggering the manual run pipeline works but the automatic pipeline run doesn’t. Can anyone help me to solve this problem?