-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Description
The CLI works in CI/CD (--no-interaction, --token, JSON output, proper exit codes) but there is no guidance on how to set it up. Users must write workflow files from scratch. Vercel and Fly generate these automatically.
What it would do
cloud ci:setup --provider github-actions
# Creates .github/workflows/cloud-deploy.yml
# Asks: Auto-deploy on push to main? (yes)
# Asks: Deploy to which environment? (production)
# Asks: Require approval for production? (no)
#
# Created: .github/workflows/cloud-deploy.yml
#
# Next steps:
# 1. Add LARAVEL_CLOUD_API_TOKEN as a repository secret
# 2. Push to main to trigger your first automated deploymentGenerated workflow example
name: Deploy to Laravel Cloud
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- run: composer global require laravel/cloud-cli
- run: cloud deploy --no-interaction
env:
LARAVEL_CLOUD_API_TOKEN: ${{ secrets.LARAVEL_CLOUD_API_TOKEN }}Feasibility
Safe and straightforward. The command only creates a new file — never modifies existing workflows. If .github/workflows/cloud-deploy.yml already exists, it warns and exits.
Supports: github-actions, gitlab-ci, bitbucket-pipelines (could start with GitHub Actions only).
Implementation
- New command
app/Commands/CiSetup.phpwithNoAuthRequiredinterface (doesn't need API token) - Prompt for provider, branch, environment
- Generate YAML from template
- Write to correct location
- Show next steps
Impact
Enables 30% more users to automate deployments. Currently only developers who know how to write CI workflow files can automate — this opens it to everyone.
Builds on
- PR feat: add --token flag and LARAVEL_CLOUD_API_TOKEN env var support #33 (
--tokenflag) — the generated workflow usesLARAVEL_CLOUD_API_TOKEN - PR feat: add global --application and --environment flags #64 (
--applicationflag) — the workflow can specify the target app
Environment
- Cloud CLI: v0.1.14
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.