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!
From what you describe, your only use for gulp is to compile the sass to css.
Therefore, if you drop to writing css, there won’t be any need to compile anything, which means gulp won’t be needed, right?
If that’s the case, then you’ll only need to copy over the changes to DO and that’ll be all, whenever you make changes.
You can run gulp commands via Github Actions if that is a must also, that way, you don’t need to run those commands on your machine everytime before you push to Github
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.