-
Notifications
You must be signed in to change notification settings - Fork 4
Deploy
Deploying your site to a server (or multiple) can be a bit tedious. Luckily stag is here to help. The deployment routine, (depending on how you have it configured) can pull_content, deploy, clear_cache and set_permissions.
The deploy config needs to be nested under the server name in your server's configuration. The config varies slightly based on the desired strategy to use. Use the following example's below as a guide.
Git Example:
deploy:
pull_content_before: true
clear_cache_after: true
set_permissions_after: false
Rsync Example:
deploy:
pull_content_before: true
clear_cache_after: true
set_permissions_after: false
ignore_files:
- .git
- _cache
- _logs
FTP Example:
deploy:
pull_content_before: true
clear_cache_after: true
set_permissions_after: true
ignore_files:
- .git
- _cache
- _logs
pull_content_before: Set this run the pull_content command before deployment. If content isn't edited on the server or it is a development server, this might be better turned off.
clear_cache_after: Set this to clear the cache after the deployment has completed.
set_permissions_after: Set to run the set_permissions command after deployment. FTP is the only strategy that really needs this.
ignore_files: List out the directories you'd like to ignore in the deployment. As .gitignore handles this for git deployments, it's only needed when using ftp & rsync.
####stag deploy <server_name>
This will deploy your site to the named server.