Update .gitlab-ci.yml file
This commit is contained in:
parent
67e0692439
commit
65521c2531
@ -34,26 +34,14 @@ release:
|
|||||||
# Install Gulp globally
|
# Install Gulp globally
|
||||||
- npm install --global gulp-cli
|
- npm install --global gulp-cli
|
||||||
- gulp --version # Verify Gulp is installed
|
- 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
|
# Set Git configuration
|
||||||
- git config --global user.name "GitLab CI"
|
- git config --global user.name "GitLab CI"
|
||||||
- git config --global user.email "ci@gitlab.com"
|
- git config --global user.email "ci@gitlab.com"
|
||||||
# Update the Git remote to use SSH
|
# Use the PAT for authentication
|
||||||
- git remote set-url origin git@gitlab.com:wintermyst/kidsonbrooms.git
|
- git remote set-url --push origin "https://$CI_COMMITTER_USER_AND_TOKEN@gitlab.com/wintermyst/kidsonbrooms.git"
|
||||||
# Fetch and check out the master branch
|
- git fetch --unshallow # Ensure we fetch all history for the branch (not a shallow clone)
|
||||||
- git fetch --unshallow
|
- git checkout master # Switch to the master branch
|
||||||
- git checkout master
|
- git branch --set-upstream-to=origin/master master # Set the upstream to the master branch
|
||||||
script:
|
script:
|
||||||
# Check if VERSION is provided
|
# Check if VERSION is provided
|
||||||
- |
|
- |
|
||||||
|
Loading…
Reference in New Issue
Block a user