diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e46e575..b76ca2a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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}