-
-
Save tormi/04a516b740b2447f9ed588cfb198d3f0 to your computer and use it in GitHub Desktop.
Trigger Netlify build from a Google Spreadsheet for Gatsby site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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', | |
}) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.gatsbyjs.org/packages/gatsby-source-google-spreadsheet/