sydgren/laravel-shipit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sydgren/laravel-shipit

Composer 安装命令:

composer require sydgren/laravel-shipit

包简介

Trigger and monitor ShipIt deployments from Artisan — php artisan shipit:deploy.

README 文档

README

Trigger and monitor ShipIt deployments straight from your Laravel app's Artisan console.

php artisan shipit:deploy --watch

Drop it into any Laravel project, point it at a ShipIt site, and deploy from your terminal or CI pipeline — --watch streams the live log and exits non-zero if the deployment fails, so it gates a pipeline cleanly.

Requirements

  • PHP 8.2+
  • Laravel 11, 12, or 13

Installation

composer require sydgren/laravel-shipit

The service provider is auto-discovered. Optionally publish the config:

php artisan vendor:publish --tag=shipit-config

Configuration

Configure via environment variables (no published config needed):

SHIPIT_TOKEN=your-personal-access-token
SHIPIT_SITE=example.com          # site id or domain this project deploys to
SHIPIT_URL=https://shipit.henriknordquist.dk   # only if self-hosted elsewhere

Create a token in ShipIt under Settings → API tokens. SHIPIT_SITE is the default site every command targets when you don't pass one explicitly — set it once per project and php artisan shipit:deploy just works.

Commands

Command Description
shipit:deploy {site?} {--branch=} {--watch} {--no-wait} Trigger a deployment
shipit:status {site?} Latest deployment status for a site
shipit:logs {deployment?} {--site=} {--watch} Show / follow deployment output
shipit:deployments {site?} {--limit=10} List recent deployments
shipit:rollback {deployment} Roll back to a previous successful deployment
shipit:sites List all sites on your account (handy for finding ids)

{site} accepts either a numeric ShipIt id or a domain/name. When omitted, commands fall back to SHIPIT_SITE.

Examples

# Deploy the configured site and watch the log (exits non-zero on failure)
php artisan shipit:deploy --watch

# Deploy a specific branch of a specific site, don't block
php artisan shipit:deploy example.com --branch=staging --no-wait

# Tail the latest deployment's log
php artisan shipit:logs --watch

# Roll back
php artisan shipit:deployments      # find the id of a good release
php artisan shipit:rollback 1234

In CI (GitHub Actions)

- name: Deploy
  run: php artisan shipit:deploy --watch
  env:
    SHIPIT_TOKEN: ${{ secrets.SHIPIT_TOKEN }}
    SHIPIT_SITE: ${{ vars.SHIPIT_SITE }}

Programmatic use

The ShipIt facade exposes the same API client the commands use:

use Sydgren\ShipIt\Facades\ShipIt;

$siteId = ShipIt::resolveSiteId('example.com');
$deployment = ShipIt::deploy($siteId, branch: 'main')['deployment'];
$status = ShipIt::output($deployment['id'])['status'];

Testing

composer install
vendor/bin/pest

License

MIT

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固