List deployments and deploy directly from Strapi.
🕹 f3l1x.io | 💻 f3l1x | 🐦 @xf3l1x
To install latest version use NPM.
npm install --save strapi-plugin-vercel
If you want to use Vercel as a platform for your website you need to tell Vercel when to rebuild your site. Of course, you can use webhook, but it can trigger a lot of pipelines. With this plugin, you will see last vercel's deploments and can easily trigger deploy with button.
This plugin solves:
- manual triggering deployment to Vercel
- list of latest deployments
- current status of deployment
-
Install plugin.
-
Edit configuration.
There must be root key
vercel
.module.exports = ({ env }) => ({ {....}, vercel: { token: env('VERCEL_TOKEN'), teamId: env('VERCEL_TEAM_ID'), projectId: env('VERCEL_PROJECT_ID'), triggers: { production: env('VERCEL_TRIGGER_PRODUCTION') }, } });
Generate token on
https://vercel.com/account/tokens
.Get from API endpoint or inspect
https://vercel.com/{team}
page in devtools.Get from API endpoint or inspect
https://vercel.com/{team}/{project}
page in devtools.Generate webhook on
https://vercel.com/{team}/{project}/settings/git
and parse last string (webhook id).|--------------------------------------------/ project id / webhook id / https://api.vercel.com/v1/integrations/deploy/abcdefghijklm/vwxyzvwxyzzz/
-
Edit administration.
import React, { memo } from "react"; import { Padded } from "@buffetjs/core"; import { Header } from "@buffetjs/custom"; import { Deployments, DeployButton } from "./../../../../plugins/strapi-plugin-vercel/admin/src/view"; const Dashboard = () => { return ( <> <Padded top right left size="md"> <Header title={{ label: "Dashboard" }} actions={[ { Component: DeployButton }, ]} /> </Padded> <Padded right left size="md"> <Deployments /> </Padded> </> ); }; export default memo(Dashboard);
-
Profit 🚀
Consider to support f3l1x. Also thank you for using this package.