Part 1: How to set up a CI/CD pipeline to deploy your MuleSoft apps to CloudHub using GitHub Actions
In this post:
Creating CI/CD (Continuous Integration, Continuous Delivery) pipelines for your code has become a standard practice. Instead of worrying about deployments and keeping your environments up to date, you can set up this automated pipeline to do the deployments for you. You can focus on developing your code and let the pipeline take care of the rest.
In this post, we’ll learn how to create a simple CI/CD pipeline to deploy Mule applications from GitHub to CloudHub using GitHub Actions.
We’ll be using this GitHub repo for this example.
Set up your repo
We won’t go into the details of creating a GitHub repo with your Mule application. You can take a look at the example repo we’ll be using throughout the post so we can focus on explaining the CI/CD setup.
Once you have your Mule application in a GitHub repo, create a folder called .github, and inside it, create another folder called workflows. Here, create a new build.yml file and paste the following contents into it.
Note: You can name this YAML file however you want. It doesn’t have to be build.

This file is where the CI/CD pipeline is set up. Before we get into the details of this file, let’s first set up the Actions secrets with your Anypoint Platform credentials.
Set up your credentials
In your GitHub repository, go to the Settings tab (make sure you are signed in to see it). Now go to Secrets and variables > Actions. Here you will be able to set up your repository secrets.

Click on New repository secret.
In the Name field, write ANYPOINT_PLATFORM_PASSWORD.
In the Secret field, write the actual Anypoint Platform password you use to sign in to Anypoint Platform.
Click Add secret.

Repeat the same process for the ANYPOINT_PLATFORM_USERNAME secret. Add here the username you use to sign in to Anypoint Platform.
