Adds a publish button to Nova to trigger a GitHub workflow which runs you static site generator
Developed with ❤️ by GRRR
- PHP 8.2, 8.3, 8.4
- Nova 4
Add the repository to composer.json
"repositories": [
{
"type": "vcs",
"url": "https://github.com/grrr-amsterdam/nova-publish"
}
]
Add install the package
composer require grrr-amsterdam/nova-publish
Load the tool by adding it to NovaServiceProvider.php
use Publish\Publish;
public function tools()
{
return [new Publish()];
}
Publish configuration
php artisan vendor:publish --provider="Publish\ToolServiceProvider"
Configure GitHub credentials, set the name of the workflow file and configure an application version.
=======
Run yarn run dev
to watch for changes in the resources/js
directory.
Use the local checkout in a project that uses this plugin. The Composer documentation explains how to do this.
To run the tests you need a Nova License and a GitHub App with access to your repository. It will use the workflow test-workflow.yml
to do integration tests.
Create /.env
file with the following content:
NOVA_PUBLISH_PRIVATE_KEY="your GitHub App private key"
NOVA_PUBLISH_APPLICATION_ID="your GitHub App ID"
NOVA_PUBLISH_OWNER="your GitHub owner"
NOVA_PUBLISH_REPOSITORY="your GitHub repository"
To add a language or change an existing translation, please read the Laravel documentation about overriding package language files.
You need a GitHub App to use this tool. The application must have access to the repository where the workflow is located.
Use the application ID and private key in config/publish.php
.
You need a Nova license to run the tests.
- Run
yarn run prod
to build the assets, and commit the changes - Add the new version to
CHANGELOG.md