Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab pages - Incremental deploy

In gitlab pages, public directory content seems to be cleaned at each deployment. In some cases, I would keep existing files and add another ones. Do you know if it is possible to incremental deploy pages with gitlab ci?

like image 484
B3n Avatar asked Mar 18 '26 12:03

B3n


1 Answers

The public folder is not cleaned during each deployment.
However, most repositories do not actually have a public folder, it is instead created only dynamically during CI/CD. These dynamically created contents are not kept between deployments.

Simply store all files you want to keep between deployments in your repository. This can be in a folder called public in the root of your repository. This way, you will not have to move the files during CI/CD. Just make sure you do not overwrite/move/delete the files during within your .gitlab-ci.yml configuration.

Of course, you can also store the files anywhere else in your repository and just move them to the right location under public/ within your .gitlab-ci.yml configuration.

like image 153
Thomas Kainrad Avatar answered Mar 21 '26 03:03

Thomas Kainrad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!