Created with assistance from ChatGPT
Making website deployments safer, faster, and less stressful doesn’t have to be complicated. DeployBot is a straightforward, reliable tool that integrates seamlessly with ExpressionEngine to simplify and automate the deployment process.
At its core, DeployBot is a third-party deployment service that securely transfers your website code from one environment to another. While it’s most commonly used to push updates from a staging site to a live production site, it can also manage multiple environments—such as development, staging, and production—ensuring smooth collaboration across your team.
DeployBot can automate essential tasks like clearing caches, compiling assets, or running custom build scripts. It also supports deploying to multiple servers simultaneously and makes it easy to roll back to a previous version if something goes wrong.
In this post, we’ll walk you through setting up DeployBot with ExpressionEngine—from Git integration and server configuration to branch mapping and deployment best practices—so you can achieve safer, more automated deployments with far less stress.
Step 1: Connect DeployBot to Your Git Repository
To start, set up your version control.
- Connect DeployBot to your Git provider. We use GitLab, but DeployBot supports GitHub, Bitbucket, and others.
- Create the site in DeployBot. Select the repository and choose a default branch.
- Optional: Add a short “Deployment notes” template where teammates can record what has changed with each deployment. This will make tracking easier and keep your team on the same page.
Step 2: Set Up Servers & SFTP Access
Next, configure your servers safely:
- Create a dedicated deploy user on your server with write access limited to only the required directories.
- Add DeployBot’s public SSH key to the deploy user’s ```html ~/.ssh/authorized_keys``` file.
- In DeployBot, add your server using SFTP/SSH and set the deploy path to your web root (e.g., ```html /public_html``` or ```html /public```).
- Separate system directories if needed. If your ExpressionEngine system/ directory is outside the web root, add a second server target for that path (e.g., ```html /home/site/system```). This will ensure user uploads remain untouched during deployment.
- Test the connection. Run DeployBot’s built-in connection and write tests to confirm access before the first deployment.
Step 3: Staging and Production Sites
DeployBot lets you map branches to environments for safer workflows:
- Staging: Map to your staging branch, and enable automatic deploy on push
- Production: Map to main or master, and require a manual deploy–you’ll need to click or approve the deployment before pushing to the live site.
You may want to consider enabled “Require confirmation” on production and restricting who can deploy to avoid accidental changes.
Step 4: Ignore Unnecessary Files & Paths
To prevent deployment of unnecessary files, configure ignored paths in DeployBot. Make sure you adjust these based on your repo structure.
ExpressionEngine specific:
```html
images/ # uploads (rename if your uploads live elsewhere)
system/user/cache/ # EE cache
# Node / tooling (dev-only)
docker-compose.yml
Dockerfile*
docker/
package.json
package-lock.json
yarn.lock
pnpm-lock.yaml
node_modules/
```
Optional files you can add if you don’t need them on servers:
```html
.env
.env.*
**/*.map
**/*.scss
**/*.sass
.vscode/
.idea/
.DS_Store
```
By ignoring these, you’ll ensure your deployment is clean and lightweight and will not overwrite unnecessary or sensitive files.
Deployment Best Practices
- Use deployment notes to maintain a changelog for each push.
- Test on staging first before deploying to production.
- Limit production deploys to only trusted users to avoid accidental changes.
- Regularly review ignored paths and permissions to ensure the most streamlined deployment.
Using DeployBot with your ExpressionEngine site can streamline your workflow and make deployments safer, faster, and easier to manage. Take the stress out of rolling out updates with DeployBot. If you’d like to learn more about how we can help you integrate DeployBot into your ExpressionEngine workflow, get in touch—we’d love to chat.
