Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 85dbc41

Browse files
committed
Update docs
1 parent 677daac commit 85dbc41

File tree

12 files changed

+724
-510
lines changed

12 files changed

+724
-510
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
* [Installation](installation.md)
55
* [Configuration](configuration.md)
66
* [Tasks](tasks.md)
7-
* [Servers](servers.md)
7+
* [Hosts](hosts.md)
88
* [Flow](flow.md)
9-
* [Functions](functions.md)
9+
* [API Reference](api.md)
10+
11+
#### Advanced
12+
13+
* [Strategy](advanced/deploy-strategies.md)
14+
* [Deploy and Git](advanced/deploy-and-git.md)
15+
* [Parallel IO](advanced/parallel-io.md)

advanced/deploy-and-git.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Deploy and Git
2+
3+
TODO

advanced/deploy-strategies.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Deploy strategies
2+
3+
### Single server
4+
5+
TODO
6+
7+
### Build server
8+
TODO

advanced/parallel-io.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Dealing with IO in parallel mode
2+
3+
If you try to make task which will be asking user, for example about a branch,
4+
but you still want to use parallel deploy, you may notice what it's now working and program doesn't waits for used input.
5+
6+
To workaround this problem you need to create a local task and ask user about branch there:
7+
8+
~~~php
9+
task('what_branch', function () {
10+
$branch = ask('What branch to deploy?');
11+
12+
on(roles('app'), function ($host) use ($branch) {
13+
set('branch', $branch);
14+
});
15+
})->local();
16+
~~~
17+
18+
And call this task before `deploy` task:
19+
20+
~~~php
21+
before('deploy', 'what_branch');
22+
~~~
23+
24+
Now it should work as expected and user will be asked for brunch only once.
25+
26+
~~~sh
27+
$ dep deploy -p
28+
➤ Executing task what_branch
29+
What branch to deploy? master
30+
✔ Ok
31+
✔ Executing task deploy:prepare
32+
✔ Executing task deploy:release
33+
...
34+
~~~

0 commit comments

Comments
 (0)