Please check out our holiday schedule for support availability

Deploying changes with Git and DeployBot

Last Updated -

This article walks you step-by-step on how to set up DeployBot with your Pagely services.

DeployBot is a tool you can easily utilize with your environments - allowing you to quickly deploy changes made to your Application's code repository. 

What You'll Need

  1. Access to a Pagely SSH/SFTP
  2. DeployBot account
  3. A local git and/or GitHub repository (both are used for this article)

What we'll assume.

  • We'll assume you have both your Pagely SSH/SFTP access and DeployBot account set up. It is recommended that you please be logged in to these using separate browser tabs.
  • We'll also assume you've created an empty repository on GitHub and cloned it locally.
  • Lastly, we'll assume you know how to connect using SSH to a Pagely Server (if not, please review the following article)

Connecting DeployBot to your GitHub Repository

  1. Log into https://{yourorg}
  2. Select Repositories
  3. Select "Connect a repository"
  4. If your GitHub account is already connected, you should have the option to select from the dropdown menu your specific repository as seen in the git below (pagelydeploybottest)
  5. You'll need to contact Pagely support to whitelist the following IPs


Create a new branch

You can either do this step on GitHub, or locally as seen below...


Create an Environment

  1. Return to your DeployBot Dashboard where you should see your GitHub repository (you can also click on Repositories), select your repository.
  2. Select "Create an environment"
  3. Specify a name.
  4. Select "Manual" or "Automatic" (it doesn't matter, but a general rule of thumb is if you're creating a deploy scenario for a production application it's probably a good idea to choose "Manual"). We'll choose Automatic since this is a staging deployment.
  5. Select your Branch
  6. Click "Save"
  7. Select "SFTP" for the deployment option.


Adding Server Configurations

  1. Add a name for this server configuration
  2. Your Pagely VPS hostname
  3. Port 22
  4. Destination Path (I suggest putting the absolute path). WARNING: We suggest ONLY deploying to your wp-content folder. If you deploy to your webroot directory be sure to not target any WordPress core files. These are maintained by Pagely.
    1. Also be mindful that your paths between an SSH and SFTP-Only user will vary. Please check by connecting to your server and checking the relative and absolute paths first.
  5. Your Login name should be your SFTP user
  6. There will be no password since we'll be using DeployBot's public key, copy it from the example, or download the public key file
  7. Switch Over to your atomic dashboard and...
    1. In Legacy: Select My Account > SSH Configuration > Paste your public Key > Select Upload key
    2. In ARES/New Atomic: Select Your Profile Icon in the top right corner > Account Settings > >_SSH > paste the public key > Select upload key
  8. We're almost there, return to DeployBot and select "Run shell commands before Deployment" - We'll add "date > ../git-test/deploybot-ran-at"to ensure our deploy configuration runs.
  9. You can see there are a lot of options here, but for now lets Save and see if we can connect to our server successfully...


The gif below shows you how to add your public key on ARES (new atomic)...


As we saw above we've successfully connected to pagelyexample and are ready to deploy! To do this manually (or revert future changes) we can select "History" to see previous changes, and "Deploy" to manually Deploy changes.


So in our local git we'll pretend we're created a new awesome plugin that we want to commit and push to GitHub under our new branch...


If we check our server at the path we suggested, we'll notice two things...

  1. DeployBot definitely ran, we can tell because of the command we had our configuration run AFTER an event transpired.
  2. So if we merge to master (making sure everything looks okay) we should see the fruits of our labor...


Sure enough we do! We're now rocking and rolling with DeployBot and Pagely!

Related Topics

Pagely is the Managed WordPress Hosting Platform designed to exceed the needs of media, business, and Enterprise customers alike. We help the world's biggest brands scale WordPress.

Copyright © 2006-2017 Pagely, Inc. All rights reserved.
Pagely® and WordPress® are registered trademarks.

Powered by Zendesk