Cockpit CMS Addon that provides integration with Netlify deploys mechanism.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Controller initial commit Nov 25, 2018
views/deploys better handling of build state Nov 26, 2018
LICENSE initial commit Nov 25, 2018
README.md initial commit Nov 25, 2018
admin.php initial commit Nov 25, 2018
bootstrap.php increased curl timeout value Nov 26, 2018
icon.svg initial commit Nov 25, 2018

README.md

Cockpit CMS Netlify Deploys Addon

This addon provides integration with Netlify deploys mechanism, leveraging the Netlify REST API to retrieve list of latest deploys and build hooks to trigger a new deploy. The addon can be useful when combining Cockpit CMS with an static site generator hosted on Netlify, so changes on contents can be deployed easily in seconds.

Installation

  1. Confirm that you have Cockpit CMS (Next branch) installed and working.
  2. Download zip and extract to 'your-cockpit-docroot/addons' (e.g. cockpitcms/addons/Netlify, the addon folder name must be Netlify)
  3. Confirm that the Netlify deploys icon appears on the top right modules menu.

Configuration

  1. Ensure that from your Netlify account you have an access token and a build hook url.
  2. Edit Cockpit config/config.yaml and add a new entry for netlify like below:
netlify:
  build_hook_url: https://api.netlify.com/build_hooks/<hook_id>
  api_url: https://api.netlify.com/api/v1
  site_id: <site-id>
  access_token: <access-token>

Permissions

There are just two permissions:

  • manage.view - provides access to the Netlify deploy list
  • manage.deploy - provides access to trigger a new deploy

Usage

Having the configuration defined accessing the Netlify deploys page (/netlify/deploys) a list of latest (limited to 50) deploys is displayed:

Netlify dashboard

To trigger a new deploy just hist the Deploy button an confirm the action.

Demo

Netlify addon screencast

Copyright and license

Copyright 2018 pauloamgomes under the MIT license.