Gatsby: How to update/redeploy automatically Github Pages when new content is published from Prismic.io?

Created on 23 Nov 2018  路  2Comments  路  Source: gatsbyjs/gatsby

Hi!
I'm using Gatsby and Prismic.io for the CMS. I use also the plugin gatsby-source-prismic.
I can build and deploy my blog on GitHub Pages, it works great.
But I have to manually build and reploy on Github to have new content.

How to automatize the process #costfree? (Yeah using webhooks... but how?)

Do I have to do a .sh ?

Someone can explain? Or do you have a tutorial please?

Thank you!

Environment (if relevant)

  System:
    OS: macOS 10.14
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 8.12.0 - /usr/local/bin/node
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 70.0.3538.102
    Safari: 12.0
  npmPackages:
    gatsby: ^2.0.24 => 2.0.43 
    gatsby-image: ^2.0.15 => 2.0.20 
    gatsby-plugin-lodash: ^3.0.1 => 3.0.2 
    gatsby-plugin-manifest: ^2.0.5 => 2.0.8 
    gatsby-plugin-offline: ^2.0.6 => 2.0.13 
    gatsby-plugin-react-helmet: ^3.0.0 => 3.0.1 
    gatsby-plugin-sharp: ^2.0.7 => 2.0.12 
    gatsby-plugin-sitemap: ^2.0.1 => 2.0.2 
    gatsby-plugin-styled-components: ^3.0.1 => 3.0.1 
    gatsby-source-prismic: ^2.0.0 => 2.1.0 
    gatsby-transformer-sharp: ^2.1.4 => 2.1.8 
  npmGlobalPackages:
    gatsby-cli: 2.4.5

question or discussion

Most helpful comment

This isn't easily possible with GitHub pages, as you would need a separate continuous deployment (CD) server to automatically rebuild the site.

You can use other hosting services instead, such as Netlify which has built in CD that can be triggered via Prismic.io's webhook and is also free.

I'm closing this issue as resolved, but if you have any further questions on this topic feel free to reopen or simply ask.

All 2 comments

This isn't easily possible with GitHub pages, as you would need a separate continuous deployment (CD) server to automatically rebuild the site.

You can use other hosting services instead, such as Netlify which has built in CD that can be triggered via Prismic.io's webhook and is also free.

I'm closing this issue as resolved, but if you have any further questions on this topic feel free to reopen or simply ask.

Thanks man! It works now! Very easy with Netlify.

https://spectrum.chat/?t=474f8abe-6cc6-4b91-87b2-2c4bd021b6ad

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antoinerousseau picture antoinerousseau  路  139Comments

jonathan-chin picture jonathan-chin  路  69Comments

blainekasten picture blainekasten  路  130Comments

cutemachine picture cutemachine  路  112Comments

cusspvz picture cusspvz  路  128Comments