All Projects → aderaaij → wp-vercel-deploy-hooks

aderaaij / wp-vercel-deploy-hooks

Licence: GPL-3.0 license
WordPress Plugin to trigger Vercel deploy hooks on command / update

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to wp-vercel-deploy-hooks

wp-react-typescript
💥 A React starter app with Headless Wordpress using REST API
Stars: ✭ 47 (-7.84%)
Mutual labels:  headless-cms, headless-wordpress
Strapi
🚀 Open source Node.js Headless CMS to easily build customisable APIs
Stars: ✭ 41,786 (+81833.33%)
Mutual labels:  jamstack, headless-cms
Ghost Cli
CLI Tool for installing & updating Ghost
Stars: ✭ 313 (+513.73%)
Mutual labels:  jamstack, headless-cms
agilitycms-eleventy-starter-2020
A sample Eleventy starter that uses Agility CMS and aims to be a foundation for building fully static sites using 11ty and Agility CMS.
Stars: ✭ 18 (-64.71%)
Mutual labels:  jamstack, headless-cms
Sourcebit
Sourcebit helps developers build data-driven JAMstack sites by pulling data from any third-party resource
Stars: ✭ 252 (+394.12%)
Mutual labels:  jamstack, headless-cms
plasmic
Visual page builder and web design tool for any website or web app tech stack
Stars: ✭ 1,475 (+2792.16%)
Mutual labels:  jamstack, headless-cms
Vercel
Develop. Preview. Ship.
Stars: ✭ 8,015 (+15615.69%)
Mutual labels:  jamstack, vercel
nuxt-cockpit
A Tutorial to Bundle Cockpit CMS & Nuxt.js in a full JAMstack
Stars: ✭ 45 (-11.76%)
Mutual labels:  jamstack, headless-cms
Example Company Website Gatsby Sanity Combo
This is an example company website using Gatsby and Sanity in combination.
Stars: ✭ 242 (+374.51%)
Mutual labels:  jamstack, headless-cms
Awesome Jamstack
📔 Curated list of resources: books, videos, articles, speaker decks, tools about using the JAMstack (A modern web development architecture for creating fast, secure and dynamic websites)
Stars: ✭ 115 (+125.49%)
Mutual labels:  jamstack, headless-cms
thvu-blog
My digital home on the internet.
Stars: ✭ 51 (+0%)
Mutual labels:  jamstack, vercel
qroko
WordPress theme for headless CMS
Stars: ✭ 20 (-60.78%)
Mutual labels:  headless-cms, headless-wordpress
trailing-slash-guide
Understand and fix your static website trailing slash issues!
Stars: ✭ 255 (+400%)
Mutual labels:  jamstack, vercel
commercejs-nextjs-vercel
Serverless eCommerce demo store built for the Jamstack. Built with Commerce.js, Next.js and can be one click deployed to Vercel. Includes product catalogue, categories, variants, cart, checkout, order confirmation and printable receipts. This is an open source project.
Stars: ✭ 68 (+33.33%)
Mutual labels:  jamstack, vercel
directus-metalsmith-snipcart
Lookbook web app with Directus' open source headless CMS, Metalsmith, Vue.js & Snipcart
Stars: ✭ 14 (-72.55%)
Mutual labels:  jamstack, headless-cms
Headlesscms.org
Source for headlesscms.org
Stars: ✭ 628 (+1131.37%)
Mutual labels:  jamstack, headless-cms
contentful-hugo
A CLI tool that pulls data from Contentful and turns it into markdown files for Hugo and other static site generators. It also includes an express server that can be used for local development and content previews
Stars: ✭ 31 (-39.22%)
Mutual labels:  jamstack, headless-cms
Portfolio
A Next.js & Material UI portfolio that stylizes markdown files from the GitHub API and Contentful CMS.
Stars: ✭ 18 (-64.71%)
Mutual labels:  jamstack, vercel
Ghost
Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
Stars: ✭ 39,261 (+76882.35%)
Mutual labels:  jamstack, headless-cms
exo
EXO, the empathy-first framework for an accessible world.
Stars: ✭ 75 (+47.06%)
Mutual labels:  jamstack, vercel

WP Vercel Deploy Hooks

A WordPress plugin to deploy a static site to Vercel when you publish a new WordPress post/page, update a WordPress post/page or deploy on command from the WordPress admin menu and admin bar.

Based on the excellent WordPress Plugin WP Netlify Webhook Deploy.

Features

  • 🚗   Deploy your Vercel project when publishing / updating a WordPress post
  • 👉   Manually deploy your Vercel Project with the push of a button
  •   Schedule deploys on a daily or weekly basis (mileage may vary).

🛠 Installation

You can install WP Vercel Deploy Hooks manually or through Composer

🤙 Manual Install

  1. Download the plugin as a .zip file from the repository
  2. Login to your WordPress site and go to Plugins -> Add new -> Upload plugin
  3. Locate the .zip file on your machine, upload and activate

🎼 Composer

Composer allows you to install pacakges from a GitHub repository. This repository includes a composer.json file which declares the package as a WordPress plugin. Include it in your project's composer.json as following:

...
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/aderaaij/wp-vercel-deploy-hooks.git"
    }
  ],
  "require": {
    "aderaaij/wp-vercel-deploy-hooks": "main"
  }
...

Now the package will be included in the plugins folder when you use composer install/update.

⚙️ Settings / Configuration

To enable the plugin, you will need to create a Deploy Hook for your Vercel Project.

🎚 Settings

After you've created your deploy hook, navigate to Deploy -> Settings in the WordPress admin menu and paste your Vercel Deploy hook URL. On the settings page you can also activate deploys when you publish or update a post (disabled by default).

You can configure the Vercel Deploy Hook URL in your wp-config.php or other configuration file to be based on your environment using the constant WP_VERCEL_WEBHOOK_ADDRESS. An example follows:

switch (WP_ENVIRONMENT_TYPE) {
    case "live":
    case "production":
        define( 'WP_VERCEL_WEBHOOK_ADDRESS', 'https://api.vercel.com/v1/integrations/deploy/<sample>/<sample>' );
        break;

    case "test":
    case "staging":
        define( 'WP_VERCEL_WEBHOOK_ADDRESS', 'https://api.vercel.com/v1/integrations/deploy/<sample>/<sample>' );
        break;

    case "dev":
    case "development":
        define( 'WP_VERCEL_WEBHOOK_ADDRESS', 'https://api.vercel.com/v1/integrations/deploy/<sample>/<sample>' );
        break;
        
    case "local":
        define( 'WP_VERCEL_WEBHOOK_ADDRESS', 'https://api.vercel.com/v1/integrations/deploy/<sample>/<sample>' );
        break;
}

See https://make.wordpress.org/core/2020/07/24/new-wp_get_environment_type-function-in-wordpress-5-5/ for more guidance on using WP_ENVIRONMENT_TYPE

Scheduling

When you enable scheduling it calls the cron_schedules hook which depends on your site having visitors to be triggered. To make sure your schedule is triggered timely, you could schedule a CRON job in your hosting panel which calls wp-cron.php. Please check out the Webhook Netlify Deploy scheduling documentation for more information.

👯 Contributors & Credits

This plugin was based on the excellent WordPress Plugin WP Netlify Webhook Deploy

Made with contrib.rocks.

🤔 To Do

  • Add support for deploy and build statusses and updates through the Vercel API
  • Add support for Netlify Builds and Deploys
  • Add support for multiple Vercel deploy endpoints
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].