I’m running a WordPress site on a DO droplet whose static js and CSS are generated via
gulp tasks. For those interested, I’ll leave the contents of my
gulpfile below. My entire WordPress site is stored on Github and I’m using GitHub Webhooks to auto-deploy new commits that reach the repo to my DO server.
I use SASS to facilitate writing styles (for anyone unfamiliar, SASS compiles to pure CSS). This is done via the
compile:sass task in my gulpfile. Today, I need to run
gulp locally and commit the built CSS file (style.css) to my repo so that the changes end up on my server. This is a bad practice and one I’d like to change. In an ideal world, should my server be executing
gulp every time it receives a message from GitHub’s webhook? Are there additional build processes that I should implement to make my setup more bulletproof?
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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!