> ## Documentation Index
> Fetch the complete documentation index at: https://laravel-slipway.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Define your CI/CD once, in PHP. Compile it to GitHub Actions, Bitbucket Pipelines and GitLab CI.

<Frame>
  <img src="https://mintcdn.com/laravel-slipway/dkVNyWyziSdUw-gl/images/github-social-preview-1280x640.png?fit=max&auto=format&n=dkVNyWyziSdUw-gl&q=85&s=8dc7e3954bd7438cc593ec07e8c7b79e" alt="Slipway: one config, three pipelines" width="1280" height="640" data-path="images/github-social-preview-1280x640.png" />
</Frame>

**Slipway** is a Laravel package that treats `config/slipway.php` as the single source of truth for your pipeline. The provider YAML files are *generated* from it, committed, and guarded: if somebody edits a workflow by hand (or forgets to regenerate it), CI fails.

```php theme={null}
// config/slipway.php
return [
    'drivers' => ['github' => true, 'gitlab' => true],
    'php'     => ['8.3', '8.4'],

    'stages' => [
        'quality' => ['pint', 'larastan', 'composer-audit', 'secret-scan'],
        'test'    => ['matrix' => true, 'steps' => ['pest' => ['services' => ['mysql']]]],
        'build'   => ['build-artifact'],
    ],

    'environments' => [
        'staging'    => ['branch' => 'main', 'via' => 'ssh', 'rollback' => true,
                         'verify' => ['url_secret' => 'STAGING_URL'], 'options' => ['host' => 'staging.example.com', 'user' => 'deploy', 'path' => '/var/www/staging']],
        'production' => ['after' => 'staging', 'approval' => true, 'via' => 'ssh', 'rollback' => true,
                         'verify' => ['url_secret' => 'PRODUCTION_URL'], 'options' => ['host' => 'app.example.com', 'user' => 'deploy', 'path' => '/var/www/app']],
    ],

    'policies' => ['tests-before-deploy', 'approval-for-production', 'rollback-for-production'],
    'secrets'  => ['SSH_PRIVATE_KEY', 'SSH_KNOWN_HOSTS', 'STAGING_URL', 'PRODUCTION_URL'],
];
```

```bash theme={null}
php artisan slipway:compile   # writes .github/workflows/slipway.yml and .gitlab-ci.yml
php artisan slipway:check     # fails if the committed YAML is stale (CI runs this for you)
```

## Why

| Problem with hand-written pipelines | What Slipway does |
| - | - |
| YAML drifts between providers and between repositories | One PHP config, one deterministic compiler. Same input, same bytes. |
| Someone edits the workflow in a hurry and nobody reviews it properly | A `slipway-guard` job fails the build when the YAML differs from the config. |
| Secrets end up in YAML, logs or shell history | Secrets are referenced **by name only**. A scanner checks the config and the generated output. Values are never printed. |
| "We deploy on Fridays and hope" | Build once, deploy that same artifact to every environment, health-check it, roll back automatically. |
| Safety rules live in a wiki | **Policies** such as `tests-before-deploy` fail compilation if a change would weaken them. |
| Provider lock-in | Switch or add a provider with one line. Unsupported features are reported, or are errors in `strict` mode. |

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Install Slipway, pick a preset, compile, and commit the generated YAML.
  </Card>

  <Card title="Configuration" icon="sliders" href="/configuration">
    Every config key, with defaults and meaning.
  </Card>

  <Card title="Deployment" icon="cloud-arrow-up" href="/environments">
    Build once, promote the same artifact, verify, and roll back.
  </Card>

  <Card title="Extending" icon="puzzle-piece" href="/extending">
    Add steps, deployers, policies, and providers without forking.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.