Answer the question
In order to leave comments, you need to log in
How to make the easiest deployment in GitLab?
Good day.
How best to organize the most minimal deployment to the server in GitLab. Let's say a simple HTML page. After merging to master and a successful pipeline to the prod server, checkout and pull.
From the solutions I found the following config for .gitlab-ci.yml :
deploy-master:
stage: deploy
script:
- ssh [email protected] "
cd /var/www/ &&
git checkout . &&
git checkout master &&
git pull
"
environment:
name: production
only:
- master
Answer the question
In order to leave comments, you need to log in
And how would you do it.
deploy-master:
stage: deploy
script: dep --file=deploy/deploy.php -vvv deploy prod
Another example of a config for deploying a php site, there is a config using rsync https://coderun.ru/blog/deplojj-php-sajjta-iz-gitl...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question