Skip to content

Commit

Permalink
Merge pull request #5 from joranquinten/feat/webhook
Browse files Browse the repository at this point in the history
feat(): add manual build script
  • Loading branch information
joranquinten authored Mar 30, 2020
2 parents 00bc858 + 927af0c commit ec72177
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"webhook": "node rebuild.js",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
Expand Down
11 changes: 11 additions & 0 deletions rebuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const axios = require('axios');

axios.post('https://api.netlify.com/build_hooks/5e81a13dba4c82f7cdddcce9')
.then(response => {
console.log('Build started');
console.log(response.data);
})
.catch(error => {
console.log(error);
});

0 comments on commit ec72177

Please sign in to comment.