Skip to content

feat(deployments): add per-site Deployments + deploy script#24

Merged
fbarrento merged 1 commit into
mainfrom
feat/8-deployments
May 24, 2026
Merged

feat(deployments): add per-site Deployments + deploy script#24
fbarrento merged 1 commit into
mainfrom
feat/8-deployments

Conversation

@fbarrento
Copy link
Copy Markdown
Contributor

Summary

First 4-level-deep nested resource — $forge->server($s)->site($id)->deployments() / ->deployment($d) / ->deploy() / ->deploymentScript(). The convenience entry point most Forge automation needs.

  • Data\Deployment (nested Data\DeploymentCommit; started_at/ended_at nullable for queued deploys) + Data\DeploymentScript
  • Data\UpdateDeploymentScriptData, Data\ListDeploymentsOptions (sort + filter[commit_hash|commit_message|commit_author])
  • Enums\DeploymentStatus
  • Requests: GetDeployments, GetDeployment, TriggerDeployment (POST), GetDeploymentScript, UpdateDeploymentScript (PUT)
  • Resources\DeploymentsResource (all/iterate/trigger), DeploymentResource (get), DeploymentScriptResource (get/update)
  • SiteResource::deploy() sugar over deployments()->trigger()

Recording notes

Fixtures recorded against a real GitHub-connected Laravel site, deployed end-to-end via the SDK itself — the deploy initially failed (php site default script ran artisan before deps existed), so I fixed it through the new deploymentScript()->update() (composer install first) and re-deploy()ed to green. DeploymentFixture redacts the script content, the commit author, and pagination cursors.

Test plan

  • composer test — pint, rector, phpstan, 401 tests / 774 assertions, 100% coverage.
  • All 5 deployment fixtures recorded live and verified redacted (no real author/paths/cursors).

🤖 Generated with Claude Code

First 4-level-deep nested resource:
$forge->server($s)->site($id)->deployments()/->deployment($d)/
->deploy()/->deploymentScript().

- Data\Deployment (nested Data\DeploymentCommit value object, started_at/
  ended_at nullable for queued deploys), Data\DeploymentScript
- Data\UpdateDeploymentScriptData, Data\ListDeploymentsOptions
  (sort + filter[commit_hash|commit_message|commit_author])
- Enums\DeploymentStatus
- Requests: GetDeployments, GetDeployment, TriggerDeployment (POST),
  GetDeploymentScript, UpdateDeploymentScript (PUT)
- Resources\DeploymentsResource (all/iterate/trigger),
  DeploymentResource (get), DeploymentScriptResource (get/update)
- SiteResource sugar: deploy() over deployments()->trigger()

Fixtures recorded against a real GitHub-connected Laravel site deployed
via the SDK itself (deploy script fixed through deploymentScript()->update()
to run composer install before artisan). DeploymentFixture redacts the
script content, the commit author, and pagination cursors.

401 tests / 774 assertions / 100% coverage.

Closes #8.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@fbarrento fbarrento self-assigned this May 24, 2026
@fbarrento fbarrento merged commit 954d58c into main May 24, 2026
26 checks passed
fbarrento added a commit that referenced this pull request May 24, 2026
…it (#28)

Folds the divergences that had only lived in PR descriptions into
docs/FINDINGS.md: ssh-key create 202-empty, the four Sites findings
(server-less GET, runtime-required domain_mode, fresh-site nulls,
PUT-empty), the deployments script/trigger notes, the two daemon findings
(update needs config, install-state race), and the fixture-redaction
hardening from the security audit (#27).

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant