By Daz Wilkin
I’ve a hunch I’m going to kick myself, but…
Is there a way to commit files to repo but exclude them from being deployed?
I’ve a very simple static site and deployment using Apps works fine.
However, I’d like to document the repo too and exclude those files from being deployed.
I can’t exclude them with .gitignore because I’d like them committed to the repo.
I tried .dockerignore but the files continue to be copied.
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!
Great question, when generating your static site, saving the content you want to deploy to a specific folder, called an output directory, will only deploy those files. Anything not in that folder will not get deployed.
This can be set under the static site component in your apps Components tab.
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.