Skip to content

Instantly share code, notes, and snippets.

@tormi
Forked from jmolivas/script.js
Last active April 2, 2019 19:27
Show Gist options
  • Save tormi/04a516b740b2447f9ed588cfb198d3f0 to your computer and use it in GitHub Desktop.
Save tormi/04a516b740b2447f9ed588cfb198d3f0 to your computer and use it in GitHub Desktop.
Trigger Netlify build from a Google Spreadsheet for Gatsby site
# From your Google Spreadsheet, select the menu item Tools > Script editor.
# Copy and paste this code.
# Replace uuid with the build_hooks uuid from your Netlify project.
# https://twitter.com/jmolivas/status/1112765435206787072
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Scripts')
.addItem('Build', 'build')
.addToUi();
}
function build() {
UrlFetchApp.fetch('https://api.netlify.com/build_hooks/uuid', {
'method': 'post',
})
}
@tormi
Copy link
Author

tormi commented Apr 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment