Skip to content

A Laravel Nova tool for deploying your website to Netlify.

Notifications You must be signed in to change notification settings

grrr-amsterdam/nova-netlify-deploy

Repository files navigation

# Nova publish

Adds a publish button to Nova to deploy your website to Netlify

Table of Contents

Requirements

Return To Top

  • Laravel Nova
  • A Netlify account

Installation

Return To Top

Install package

composer require grrr/nova-netlify-deploy

For older Nova use grrr/nova-netlify-deploy:^1.0.

Load the tool by adding it to NovaServiceProvider.php

use Grrr\NetlifyDeploy\NetlifyDeployTool;

...

    /**
     * Get the tools that should be listed in the Nova sidebar.
     *
     * @return array<Tool>
     */
    public function tools()
    {
        return [new NetlifyDeployTool()];
    }

...

Publish configuration

php artisan vendor:publish --provider="Grrr\NetlifyDeploy\NetlifyDeployServiceProvider"

Add your Netlify credentials to the config file. You can use environment variables for this:

  • NETLIFY_ACCESS_TOKEN
    Used to connect with the Netlify API.
    Create a new token here: https://app.netlify.com/user/applications/personal
  • NETLIFY_SITE_ID
    This is the site you wish to deploy from the CMS.
    You can find this under Site Settings, listed under Site information as API ID.

Card

If you want, you can use the card provided by this package to show the deploy status on your Nova dashboard.
Include the card in the cards array of your NovaServiceProvider:

use Grrr\NetlifyDeploy\NetlifyDeployCard;

protected function cards()
{
    return [new NetlifyDeployCard()];
}

Events

This package broadcasts a PublicationWasStarted event right before the Netlify API has been instructed to create a new deploy. You can listen to this in your application if you have a need.

About

A Laravel Nova tool for deploying your website to Netlify.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •