Fix CI detached HEAD issue

This commit is contained in:
Jim Hamill
2025-02-16 05:18:04 +00:00
parent 5d05e625ad
commit 748c70fff7
+5
View File
@@ -42,6 +42,11 @@ publish:development:
# Configure git to push with CI token
- git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
# Checkout the branch instead of detached HEAD
# NOTE: GitLab CI will use a detached HEAD
- git checkout -B ${CI_COMMIT_REF_NAME}
- git pull origin ${CI_COMMIT_REF_NAME}
# Setup npm config for npmjs.com
- npm config set registry https://registry.npmjs.org/
- npm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN}