Download the PHP package ryangjchandler/forge-previewer without Composer
On this page you can find all versions of the php package ryangjchandler/forge-previewer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ryangjchandler/forge-previewer
More information about ryangjchandler/forge-previewer
Files in ryangjchandler/forge-previewer
Package forge-previewer
Short Description Create preview deployments for pull request with Laravel Forge.
License MIT
Informations about the package forge-previewer
Forge Previewer
This CLI is designed to create "preview" environments for pull requests and branches using Laravel Forge.
It's intended for use inside of CI tools such as GitHub Actions to automatically create a site on Forge that is connected to your pull request branch, then once the pull request is merged the CLI can be used to cleanup too.
Prerequisites
Before using this tool, please make sure you have the following:
- A server connected to Forge
- A wildcard subdomain DNS record pointing to your Forge server.
- A Forge API token
Installation
Install this package with Composer:
Usage
There are two commands in the command.
deploy
- Creates and deploys a site.destroy
- Deletes and cleans up after a site.
deploy
The deploy
command is used to do the following things:
- Create a site on Forge.
- Generate an SSL certificate for the new site.
- Create a database for the new site.
- Enable quick deploy so all changes appear on the preview site automatically.
- Update the environment variables to point to the database.
- Deploy your site once.
- Run any additional commands provided.
- Create a scheduled job if required.
The command accepts the following flags:
Note: the
deploy
command can be run multiple times and will skip any steps that have already been run previously.
destroy
The destroy
command simply reverses all of the things that the deploy
command does. It checks for the existence of certain resources in Forge and removes them if they exist.
The command accepts the following flags:
Since Forge Previewer is convention based, we will try to detect resources based on the names we generate for them.
Example Workflow
TODO
All versions of forge-previewer with dependencies
laravel-zero/framework Version ^9.0
laravel/forge-sdk Version ^3.13
nunomaduro/termwind Version ^1.3