docs/recipe/statamic.md
<!-- DO NOT EDIT THIS FILE! -->
<!-- Instead edit recipe/statamic.php -->
<!-- Then run bin/docgen -->
# How to Deploy a Statamic Project
```php
require 'recipe/statamic.php';
```
[Source](/recipe/statamic.php)
Deployer is a free and open source deployment tool written in PHP.
It helps you to deploy your Statamic application to a server.
It is very easy to use and has a lot of features.
Three main features of Deployer are:
- **Provisioning** - provision your server for you.
- **Zero downtime deployment** - deploy your application without a downtime.
- **Rollbacks** - rollback your application to a previous version, if something goes wrong.
Additionally, Deployer has a lot of other features, like:
- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax.
- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application.
- **Secure** - Deployer uses SSH to connect to your server.
- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks.
You can read more about Deployer in [Getting Started](/docs/getting-started.md).
The [deploy](#deploy) task of **Statamic** consists of:
* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release
* [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment
* [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy
* [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy
* [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release
* [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code
* [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs
* [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors
* [artisan:storage:link](/docs/recipe/laravel.md#artisanstoragelink) – Creates the symbolic links configured for the application
* [artisan:cache:clear](/docs/recipe/laravel.md#artisancacheclear) – Flushes the application cache
* [statamic:stache:clear](/docs/recipe/statamic.md#statamicstacheclear) – Clears the "Stache" cache
* [statamic:stache:warm](/docs/recipe/statamic.md#statamicstachewarm) – Builds the "Stache" cache
* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release
* [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release
* [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy
* [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases
* [deploy:success](/docs/recipe/common.md#deploysuccess) –
The statamic recipe is based on the [laravel](/docs/recipe/laravel.md) recipe.
## Configuration
### statamic_version
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L15)
```php title="Default value"
$result = run('{{bin/php}} {{release_or_current_path}}/please --version');
preg_match_all('/(\d+\.?)+/', $result, $matches);
return $matches[0][0] ?? 'unknown';
```
## Tasks
### statamic:addons:discover
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L26)
Rebuilds the cached addon package manifest.
### statamic:assets:generate-presets
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L33)
Generates asset preset manipulations.
### statamic:assets:meta
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L36)
Generates asset metadata files.
### statamic:git:commit
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L43)
Git add and commit tracked content.
### statamic:glide:clear
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L50)
Clears the Glide image cache.
### statamic:responsive:generate
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L57)
Generates responsive images.
### statamic:responsive:regenerate
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L60)
Regenerate responsive images.
### statamic:search:insert
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L67)
Inserts an item into its search indexes.
### statamic:search:update
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L70)
Update a search index.
### statamic:stache:clear
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L77)
Clears the "Stache" cache.
### statamic:stache:doctor
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L80)
Diagnose any problems with the Stache.
### statamic:stache:refresh
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L83)
Clears and rebuild the "Stache" cache.
### statamic:stache:warm
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L86)
Builds the "Stache" cache.
### statamic:static:clear
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L93)
Clears the static page cache.
### statamic:static:warm
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L96)
Warms the static cache by visiting all URLs.
### statamic:support:details
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L103)
Outputs details helpful for support requests.
### statamic:updates:run
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L110)
Runs update scripts from specific version.
### deploy
[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L118)
Deploys your project.
This task is group task which contains next tasks:
* [deploy:prepare](/docs/recipe/common.md#deployprepare)
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors)
* [artisan:storage:link](/docs/recipe/laravel.md#artisanstoragelink)
* [artisan:cache:clear](/docs/recipe/laravel.md#artisancacheclear)
* [statamic:stache:clear](/docs/recipe/statamic.md#statamicstacheclear)
* [statamic:stache:warm](/docs/recipe/statamic.md#statamicstachewarm)
* [deploy:publish](/docs/recipe/common.md#deploypublish)