Hacker News new | past | comments | ask | show | jobs | submit login

(disclaimer: Netlify employee)

Netlify supports running a build script automatically whenever you push to one of our supported Git providers (we also have a CLI tool for those who prefer to do that manually). This includes creating deploy previews for branches other than your main deploy branch (such as PRs).

This is actually how the project I work on, Netlify CMS[0] works - the CMS is a completely open source, front-end application that pushes to GitHub using their REST API. If you’re using Netlify‘s continuous deployment, GitHub’s webhook system notifies Netlify of the push and Netlify’s buildbot builds and deploys the update to your site automatically.

[0]: https://netlifycms.org




Since you're here, I would like to take this opportunity to ask a quick question. My Jekyll site is already running on Netlify, but instead of manually creating files, I used Google Sheets and a simple NodeJS script to sync everything. Would it be possible to run this NodeJS script on Netlify CD and push to git and then let Netlify build my Jekyll site? (The script basically pulls a Google Sheet, creates markdown files and download and resizes some images)


Netlify continuous deployment is triggered by a Git commit, but you can run arbitrary Node scripts (though not _just_ Node scripts, of course) as part of your build process. I don't know of a way you could trigger deploys based on changes to the Google Sheets app without some code on your end (maybe IFTTT could work?), but everything else should be feasible if I'm understanding you correctly.


That's what I thought, I'll probably need another step somewhere that triggers the syncing and then pushes to git. After that Netlify CD would do the rest. Thanks.


I've setup that flow by adding a custom script in the google doc that triggers a Netlify build hook. You can tie custom scripts to an image (so you can make it a publish button).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: