Setup Buddy for Automatic Deployments
Once your integration has been created in Atomic, you can configure Buddy to use the Pagely deployment integration with your git repository.
Note: The instruction below assumes you have already created a new integration in Atomic.
Connect Your Git Repository and Create a Pipeline
Login into your Buddy account.
Create a new project by clicking on the New project button:
Next, refer to the relevant guide below to connect Buddy to your git repository:
Click on the New pipeline button:
In the New pipeline setup:
- Add the name (eg. "Deploy to production").
- Pick the trigger (manual, on code change, or on schedule).
- Pick the branch.
After clicking Add pipeline, you will be asked to add the first action, but we'll cover that shortly.
Set Up Your Integration Secret Key
Go to you project and click the Variables, Keys & Assets in the sidebar.
Click Add... and select Add variable.
Set the name as PAGELY_INTEGRATION_SECRET and fill the value with the Integration Secret that was generated for you in Atomic.
Make sure the encrypted checkbox is checked.
Press the Add this variable button.
Create a Deployment Pipeline
In your pipeline, add a new action by clicking the Add action button.
Next, refer to the Custom Build action. Input is required in the commands section, so you can simply use a comment, such as '#Pagely Deployment'.
Change the docker image to use the
pagely/pagely-vps-deploy
.Add the rest of the variables in the Variables tab.
Remember to set up the:
PAGELY_APP_ID
PAGELY_DEPLOY_DEST
PAGELY_INTEGRATION_ID
Note: If your code is located inside of a separate source directory, you can set it with
PAGELY_WORKING_DIR
.Lastly, press the Run button to deploy your code.
You have now completed setting up automatic deployments with Buddy.