jml
This commit is contained in:
@@ -5,14 +5,18 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
REGISTRY: registry.gitlab.com/$CI_PROJECT_PATH
|
REGISTRY: registry.gitlab.com/$CI_PROJECT_PATH
|
||||||
|
|
||||||
.deploy_setup: &deploy_setup
|
.deploy_template: &deploy_setup
|
||||||
image: alpine:latest
|
stage: deploy
|
||||||
|
image: alpine:3.20
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --no-cache openssh-client
|
- apk add --no-cache openssh-client
|
||||||
- eval $(ssh-agent -s)
|
|
||||||
- echo "$VPS_SSH_KEY" | ssh-add -
|
|
||||||
- mkdir -p ~/.ssh
|
- 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:
|
publish:
|
||||||
stage: publish
|
stage: publish
|
||||||
@@ -32,7 +36,6 @@ publish:
|
|||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
<<: *deploy_setup
|
<<: *deploy_setup
|
||||||
stage: deploy
|
|
||||||
needs: [publish]
|
needs: [publish]
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
|||||||
Reference in New Issue
Block a user