We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This gives the ability to run arbitrary code before/after any of the existing steps: update, install, migrate, build, restart.
Global before/after hooks that apply to all servers in all environments:
[[servers.production]] host = "server.com" # ... [before] install = ["yarn clean"] [after] install = ["cp -R * backup"]
If you want some per enviroment:
[before.staging] install = ["yarn clean"] [before.production] install = ["cp -R * backup"]
Or you can have some on a per-server basis:
[[servers.production]] host = "server.com" before.install = "yarn clean"
These configurations will stack and execute them in the following order:
So in the most complex example:
[[servers.production]] host = "server.com" before.install = "echo 'server'" [before] install = ["echo 'global'"] [before.production] install = "echo 'environment'"
You would see the following output:
global environment server
The actual commands to be run can be a string or an array of strings if you want to run multiple commands:
[before.production] install = ["yarn clean", "rm -rf log/*"]
The text was updated successfully, but these errors were encountered:
cannikin
Successfully merging a pull request may close this issue.
This gives the ability to run arbitrary code before/after any of the existing steps: update, install, migrate, build, restart.
Global before/after hooks that apply to all servers in all environments:
If you want some per enviroment:
Or you can have some on a per-server basis:
These configurations will stack and execute them in the following order:
So in the most complex example:
You would see the following output:
The actual commands to be run can be a string or an array of strings if you want to run multiple commands:
The text was updated successfully, but these errors were encountered: