Overview

To pull environment variables during automated deployments:
  1. In the Ghostable dashboard, navigate to the environment you wish to deploy.
  2. Open the Access tab and create a new CLI token. Tokens expire after 7, 30, or 60 days.
  3. Copy the token when it is shown—you will not be able to view it again.
  4. Store the token with your CI provider as an environment variable named GHOSTABLE_CI_TOKEN.
  5. Run ghostable env:deploy during your workflow to write variables to the local .env file.

Laravel Forge

Add GHOSTABLE_CI_TOKEN to your site’s environment variables or secrets. Call ghostable env:deploy early in the deploy script so the generated .env file is available to later steps. Example:
# Forge deploy script
cd /home/forge/example.com
ghostable env:deploy
php artisan migrate --force

Laravel Cloud

Configure GHOSTABLE_CI_TOKEN as a secret in your project’s settings. Add a pre-deploy command that runs ghostable env:deploy so the environment is populated before your application builds.

Laravel Vapor

Add the token to your Vapor environment secrets. In vapor.yml include a deploy hook that calls ghostable env:deploy before Vapor packages your application.

GitHub Actions

Store the token in your repository secrets as GHOSTABLE_CI_TOKEN and use a step similar to the following:
- name: Pull environment from Ghostable
  run: ghostable env:deploy
  env:
    GHOSTABLE_CI_TOKEN: ${{ secrets.GHOSTABLE_CI_TOKEN }}