Question

Disable auto-deploy on Apps platform for certain commits

I am using the Apps platform to deploy a Statamic site, and I have trouble customizing the Github connection for my needs.

Statamic is a CMS framework built on top of Laravel, which uses a flat-file system to store its content. Statamic offers a Git integration that uses automatic commits when users make changes to the content. So my problem with the Apps platform, is that it makes an auto-deploy every time a new commit appears in the repository. So if I set up the Git integration in Statamic every time a user changes the content it would make an unnecessary deployment.

The official Statamic documentation recommends to customize the automatic commit messages and update the deploy script to ignore these type of commits. I checked the official Digital Ocean docs about the options I can use in the Apps spec file but couldn’t find anything useful.

https://www.digitalocean.com/docs/app-platform/references/app-specification-reference/

I see I can set deploy_on_push to false to have full control over the deployment, but it’s not the most ideal solution for my problem.

Is there anything I can do to make this work automatically?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Jon Friesen
DigitalOcean Employee
DigitalOcean Employee badge
February 8, 2021
Accepted Answer

👋 @adamtroll

Interesting use-case! Here’s a possible solution:

Create another branch (eg. production) and set that as the auto-deploy branch in App Platform. Then configure your statamic git integration to pull from your default branch (eg. main or master).

This way content changes will be push into the default and pulled by statamic automatically without triggering a rebuild on App Platform. When changes that require a rebuild a merge to the production branch will trigger that.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel