1.2.0 • Published 2 years ago

@dotdev/sanity-plugin-gatsby-deploy v1.2.0

Weekly downloads
-
License
UNLICENSED
Repository
gitlab
Last release
2 years ago

Sanity Plugin Gatsby Deploy

Simple plugin to build and view sites hosted on Gatsby Cloud. This package provides a Sanity dashboard widget which triggers builds and within Gatsby Cloud.

Installation

yarn add @dotdev/sanity-plugin-gatsby-deploy
# or
npm i @dotdev/sanity-plugin-gatsby-deploy --save

Add the plugin to the plugins array in sanity.json.

"plugins": [
  // ...rest of plugins
  "@dotdev/sanity-plugin-gatsby-deploy"
]

If you have not already, append the following to the parts array in sanity.json.

{
  "implements": "part:@sanity/dashboard/config",
  "path": "dashboardConfig.js"
}

Create the file dashboardConfig.js and include the widget like this.

export default {
  widgets: [
    {
      name: "gatsby-deploy",
    },
  ],
}

Configuration

The plugin can be configured through <your-studio-folder>/config/gatsby-deploy.json:

{
  "sites": [
    {
      "title": "Staging",
      "url": "https://preview-yoursite.gtsb.io/",
      "webhook": "https://webhook.gatsbyjs.com/hooks/data_source/..."
    },
    {
      "title": "Production",
      "url": "https://yoursite.com/",
      "webhook": "https://webhook.gatsbyjs.com/hooks/data_source/publish/..."
    }
  ]
}

License

MIT © DotDev See LICENSE

1.2.0

2 years ago

1.1.2

3 years ago

1.1.1

3 years ago