deployer/docs/yaml.md

32 lines
761 B
Markdown
Raw Normal View History

2022-09-06 09:17:58 +02:00
# YAML
2021-08-29 18:56:26 +02:00
2022-03-22 20:39:45 +01:00
Deployer supports recipes written in YAML. For validating structure, Deployer uses
JSON Schema declared in [schema.json](https://github.com/deployphp/deployer/blob/master/src/schema.json).
Here is an example of YAML recipe:
```yaml
import:
- recipe/laravel.php
config:
2022-09-06 09:17:58 +02:00
repository: "git@github.com:example/example.com.git"
2022-03-22 20:39:45 +01:00
remote_user: deployer
hosts:
example.com:
2022-09-06 09:17:58 +02:00
deploy_path: "~/example"
2022-03-22 20:39:45 +01:00
tasks:
build:
2022-09-06 09:17:58 +02:00
- cd: "{{release_path}}"
- run: "npm run build"
2022-03-22 20:39:45 +01:00
after:
deploy:failed: deploy:unlock
```
YAML recipes can include recipes written in PHP. For example, some tasks maybe written in PHP and imported in YAML.
2022-09-06 09:17:58 +02:00
Also, other way around is possible: import YAML recipe from PHP. Use [import()](api.md#import) function for that.