From 65521c253124fef978f84e696be208c7a2a1e697 Mon Sep 17 00:00:00 2001 From: WinterMyst <22961076-wintermyst@users.noreply.gitlab.com> Date: Sun, 22 Sep 2024 18:12:03 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 683a6fa..05dfd4f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,26 +34,14 @@ release: # Install Gulp globally - npm install --global gulp-cli - gulp --version # Verify Gulp is installed - # Prepare SSH - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - # Decode and set up the SSH private key - - echo $SSH_PRIVATE_KEY_ENCODED | tr -d '\r\n' | base64 --decode > ~/.ssh/id_rsa - # Set permissions - - chmod 600 ~/.ssh/id_rsa - # Start the SSH agent and add the key - - eval $(ssh-agent -s) - - ssh-add ~/.ssh/id_rsa - # Add GitLab to known hosts to prevent authenticity prompt - - ssh-keyscan gitlab.com >> ~/.ssh/known_hosts # Set Git configuration - git config --global user.name "GitLab CI" - git config --global user.email "ci@gitlab.com" - # Update the Git remote to use SSH - - git remote set-url origin git@gitlab.com:wintermyst/kidsonbrooms.git - # Fetch and check out the master branch - - git fetch --unshallow - - git checkout master + # Use the PAT for authentication + - git remote set-url --push origin "https://$CI_COMMITTER_USER_AND_TOKEN@gitlab.com/wintermyst/kidsonbrooms.git" + - git fetch --unshallow # Ensure we fetch all history for the branch (not a shallow clone) + - git checkout master # Switch to the master branch + - git branch --set-upstream-to=origin/master master # Set the upstream to the master branch script: # Check if VERSION is provided - |