Forge Previewer
WARNING: This package is not ready for production usage. Use at your own risk.
This package provides a forge-previewer
command that can be used to generate pull request review deployments for your GitHub pull requests using Laravel Forge.
The command is designed to be executed inside of a GitHub Action workflow, either when a pull request is opened or using a third-party action to trigger a workflow.
It will do the following things to generate a preview deployment:
- Connect to Forge using an API token.
- Try to find an existing site for the pull request. If it can't find one, it will create one.
- Tell Forge to use the specified repository and branch as the deployment source.
- Enable Quick Deploy to ensure any changes to the pull request are automatically deployed.
- Try to find an existing database for the pull request. If it can't find one, it will create one.
- Creates a database user and generates a random password.
- Updates the site's environment file to point to the database, using the generated database user and password.
- Attempts to generate an SSL certificate for the domain.
- Freshly migrates the database and seeds it using the default
DatabaseSeeder
.