diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index daae89c..a79f66e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -30,13 +30,13 @@ jobs: - name: Pull latest code on server env: DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }} + BRANCH: ${{ github.ref_name }} run: | ssh "root@$DEPLOY_HOST" " - BRANCH="${GITHUB_REF##refs/heads/}" cd /root/art-dag/celery - git fetch origin "$BRANCH" - git checkout "$BRANCH" - git reset --hard "origin/$BRANCH" + git fetch origin $BRANCH + git checkout $BRANCH + git reset --hard origin/$BRANCH " - name: Build and push image