Giter Site home page Giter Site logo

next-door-nate / sanity-plugin-cloudflare-pages-deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ndimatteo/sanity-plugin-vercel-deploy

0.0 0.0 0.0 652 KB

Custom plugin to trigger webhooks from your Sanity Studio.

License: MIT License

JavaScript 1.11% TypeScript 98.89%

sanity-plugin-cloudflare-pages-deploy's Introduction

Vercel Deployment for Sanity

Trigger Vercel Deploy Hooks from your Sanity V3 Studio.
✨ LIVE status updates ✨ multiple deployments ✨ active polling ✨ Vercel Teams support ✨

vercel-deploy-v3


🔌 Install

yarn add sanity-plugin-vercel-deploy
# or npm
npm i sanity-plugin-vercel-deploy

Warning
This is a Sanity Studio V3 plugin. For the V2 version, please refer to the studio-v2 branch.


⚙️ Configure

// `sanity.config.ts` / `sanity.config.js`:
import { defineConfig } from 'sanity'
import { vercelDeployTool } from 'sanity-plugin-vercel-deploy'

export default defineConfig({
  // ...
  plugins: [
    // ...
    vercelDeployTool(),
  ],
})

🚀 Your first Vercel Deployment

Once installed, you should see a new "Deploy" tool in your Sanity Studio navbar.

To create a new deployment, click the "Add Project" button. Next, you'll be prompted to add the following:

Title

A name for your deployment to help you organize your deployments.
Typically, this should be the environment you are deploying to, like Production or Staging

Vercel Project Name

This is the slugified project name listed in your Vercel account.
You can find this in your Vercel Project under Settings → General → "Project Name"

Vercel Team Name (optional)

If your project is part of a Vercel Team you must provide this value.
You can find this in your Vercel Team, under Settings → General → "Team Name"

Deploy Hook URL

This is the Vercel Deploy hook you want to trigger builds with.
You can find this in your Vercel Project under Settings → Git → "Deploy Hooks"

Vercel Token

This is a token from your Vercel Account (not project).
You can find this from your Vercel Account dropdown under Settings → "Tokens"


🧪 Develop & test

This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.

See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.


🤝 License

MIT

nickdimatteo.com  ·  Github @ndimatteo  ·  Instagram @ndimatteo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.