diff --git a/.gitea/workflows/deploy-backoffice.yml b/.gitea/workflows/deploy-backoffice.yml index fd2a73a..ff8356d 100644 --- a/.gitea/workflows/deploy-backoffice.yml +++ b/.gitea/workflows/deploy-backoffice.yml @@ -25,10 +25,13 @@ jobs: - name: Checkout env: DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + DEPLOY_REF: ${{ inputs.ref }} run: | set -euo pipefail find . -mindepth 1 -delete - git clone --depth 1 --branch "${{ inputs.ref }}" \ + # inputs.ref comes through fully-qualified (refs/heads/main), not "main" + BRANCH="${DEPLOY_REF#refs/heads/}" + git clone --depth 1 --branch "$BRANCH" \ "http://${DEPLOY_TOKEN}@172.24.0.2:3000/BPPP/smb-online.git" . git remote set-url origin http://172.24.0.2:3000/BPPP/smb-online.git