jml
This commit is contained in:
@@ -5,14 +5,18 @@ stages:
|
||||
variables:
|
||||
REGISTRY: registry.gitlab.com/$CI_PROJECT_PATH
|
||||
|
||||
.deploy_setup: &deploy_setup
|
||||
image: alpine:latest
|
||||
.deploy_template: &deploy_setup
|
||||
stage: deploy
|
||||
image: alpine:3.20
|
||||
before_script:
|
||||
- apk add --no-cache openssh-client
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$VPS_SSH_KEY" | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$VPS_HOST_KEY" >> ~/.ssh/known_hosts
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_ed25519
|
||||
- chmod 600 ~/.ssh/id_ed25519
|
||||
- ssh-keyscan -H $VPS_HOST >> ~/.ssh/known_hosts
|
||||
environment:
|
||||
name: production
|
||||
url: https://balexvic.com
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
@@ -32,7 +36,6 @@ publish:
|
||||
|
||||
deploy:
|
||||
<<: *deploy_setup
|
||||
stage: deploy
|
||||
needs: [publish]
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == "main"
|
||||
|
||||
Reference in New Issue
Block a user