Answer the question
In order to leave comments, you need to log in
CI/CD for Wordpress via Gitlab?
Hi everybody.
I am very interested in the issue of setting up the gitlab-ci.yml file for Wordpress projects, with the possibility of subsequent deployment to the server via ssh.
I'd love to see some examples of the file.
Answer the question
In order to leave comments, you need to log in
fortunately gitlab-ci is a great CI solution, and unfortunately a rather controversial CD.
For deploying php projects, it is best to use deployer.org ,
An example of the simplest implementation for wp link
Further, if you want, deploy and rollback can be described without problems through gitlab-ci.yml
deploy to prodution:
stage: deploy
script:
- dep deploy prod --branch=master
only:
- master
when: manual
We use an internal self-written bash solution for Wordpress CI / CD, with a gradual transition to ansible.
The .gitlab-ci.yml in the project looks something like this:
stages:
- test
- demo
- prod
variables:
GIT_STRATEGY: none
test_stage:
stage: test
only: [test]
tags: [test]
script: deploy-wordpress-site
demo_stage:
stage: demo
only: [demo]
tags: [demo]
script: deploy-wordpress-site
prod_stage:
stage: prod
tags: [prod]
only: [prod]
script: deploy-wordpress-site
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question