Skip to content
Block deployment if outside of deployment hours.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.editorconfig Initial commit Nov 16, 2019
.gitignore
.nvmrc
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

CircleCI npm version

netlify-deployment-hours-plugin

A Netlify build plugin that blocks deployment if it outside of deployment hours.

Usage

Run

npm i -D netlify-deployment-hours-plugin

Then add the following to your netlify.yml file:

plugins:
  - type: netlify-deployment-hours-plugin

There are two environment variable used to configure this plugin:

  • DEPLOYMENT_HOURS_EXPRESSION
    • A cron-like expression that expresses when a deployment can occur
  • DEPLOYMENT_HOURS_TIMEZONE
    • tz database value that expresses the timezone of the expression

Both are passed into cron-allowed-range to determine if a deployment should proceed. See the cron-allowed-range documentation for more details on how to form the cron-like expression.

You can’t perform that action at this time.