npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

strapi-plugin-multi-site-vercel-deploy

v2.0.2

Published

Strapi v4 plugin to trigger and monitor deployment of multiple applications on Vercel

Downloads

7

Readme

Vercel Deploy

Strapi v4 plugin to trigger and monitor a deployment on Vercel.

Vercel Deploy Logo

Plugin Preview

Home Page:

Plugin Home Page

Installation

Install dependency

Run the following command in your Strapi project to install vercel-deploy:

yarn add strapi-plugin-multi-site-vercel-deploy
# or
npm i -S strapi-plugin-multi-site-vercel-deploy

Enable plugin configuration

Open config/plugins.js file and add the vercel-deploy entry:

module.exports = ({ env }) => ({
  "multi-site-vercel-deploy": {
    enabled: true,
  },
});

Run

You can now run Strapi:

yarn develop

You should see the Vercel Deploy menu in the left panel.

N.B. You may need to run yarn build in order to see the new menu entries.

Then you can proceed with the plugin configuration.

Plugin Configuration

Config properties

Example:

module.exports = ({ env }) => ({
  "vercel-deploy": {
    enabled: true,
    config: {
      sites: [
        {
          deployHook:
            "https://api.vercel.com/v1/integrations/deploy/prj_<deploy-hook>",
          apiToken: "<vercel-api-token>",
          appFilter: "your-app-name-on-vercel",
          teamFilter: "your-team-id-on-vercel",
          displayName: "app-name-to-be-displayed-in-dropdown",
          roles: ["strapi-super-admin", "strapi-editor", "strapi-author"],
        },
      ],
    },
  },
});

The plugin is reading the following configuration variables to work:

  • deployHook: Url of the git deploy hook exposed in Vercel.

    • You can follow this guide to create a deploy hook on Vercel
  • apiToken: API token of your Vercel account used to fetch the list of deployments

  • appFilter: Name of your Vercel App used to filter the list of deployments

    • Set the name of your Vercel App to see only the deployments you need
  • teamFilter: Id of your Vercel Team used to filter the list of deployments

    • Set the id of your Vercel Team to see only the deployments you need
  • roles: List of user roles that can use the plugin

    • Any user with at least one of the specified roles can use the plugin. If the list is empty or undefined, any user can use the plugin.

Environment Configuration

You shouldn't disclose the api token and the deploy hook url for security reasons. Therefore, you shouldn't add these values to versioning in a public git repository. A suggested solution is to use environment variables. Example:

module.exports = ({ env }) => ({
  "vercel-deploy": {
    enabled: true,
    config: {
      sites: [
        {
          deployHook: process.env.VERCEL_DEPLOY_PLUGIN_HOOK,
          apiToken: process.env.VERCEL_DEPLOY_PLUGIN_API_TOKEN,
          appFilter: process.env.VERCEL_DEPLOY_PLUGIN_APP_FILTER,
          teamFilter: process.env.VERCEL_DEPLOY_PLUGIN_TEAM_FILTER,
          displayName: process.env.VERCEL_DEPLOY_PLUGIN_DISPLAY_NAME,
          roles: ["strapi-super-admin"],
        },
      ],
    },
  },
});

Local development

For local development, you can add the config properties in your .env file:

VERCEL_DEPLOY_PLUGIN_HOOK="https://api.vercel.com/v1/integrations/deploy/prj_<deploy-hook>"
VERCEL_DEPLOY_PLUGIN_API_TOKEN="<vercel-api-token>"
VERCEL_DEPLOY_PLUGIN_APP_FILTER="your-app-name-on-vercel"

Credits

Thanks to gianlucaparadise for making strapi-plugin-vercel-deploy which this was based on.