Configuring Github CICD workflow for Zoho Catalyst Web Client and Functions
We can migrate our Catalyst project from the GitHub Repository to the Catalyst development environment using the Github workflow. You can learn more about the GitHub workflows here.
Pre-requisites:
- Before setting up make sure you have the following data for your catalyst project
- catalyst token
- Catalyst project name
- Catalyst Project Org ID
- To know how to set up a catalyst project, you can try this tutorial on a simple web application.
- You need to generate a CLI token for executing commands for your user account from Catalyst CLI by executing the following command:
- This will initiate the token generation process. The CLI will display a URL that you can visit from any device. It will also generate a device verification code, which you must enter on the web page of the URL.
- Navigate to the URL displayed in the CLI and enter the verification code. Click Verify. The code will only be valid for five minutes.
- Once your device's CLI is verified, the token will be generated and displayed in your CLI.Do make a copy of that token.
- You can find your Catalyst Project name and Catalyst Org ID from the Catalyst Console Homepage: "https://console.catalyst.zoho.com/baas/{OrgID}/index"
CI/CD Setup:
- Navigate to the main branch of your GitHub repository where you stored your Catalyst project and create a Workflow Directory .github/workflows and create a YAML file called main.yml under the directory .github/workflows which contains the script code to run the workflow
- To know more about GitHub workflows kindly refer here.
- After setting up the runners based on your preference you need to paste the below code based on the type of functions your catalyst application is going to run on.
- name: Create Release
- on:
- push:
- branches:
- - 'main'
- jobs: build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v1
- - name: Loading Node.js
- uses: actions/setup-node@v2
- with:
- node-version: '18'
- - name: Loading Java17
- uses: actions/setup-java@v4.0.0
- with:
- java-version: '17'
- distribution: 'oracle'
- - name: Setup Python3.9
- uses: actions/setup-python@v5.0.0
- with:
- python-version: '3.9.15'
- - name: Installing catalyst
- run : npm i -g zcatalyst-cli
- - name: Installing Packages for 'Node'
- run: cd functions/{your function name}/ && npm install --omit=dev
- - name: Deploying code to catalyst
- run: catalyst deploy --project ${{secrets.CATALYST_PROJECT_NAME}} --org ${{secrets.CATALYST_ORG}} --token ${{ secrets.CATALYST_TOKEN}}
Before committing any changes you need to add the below Values in your
repository secrets. You can find the help documentation for the same here.
○ CATALYST_PROJECT_NAME - Your Project Name
○ CATALYST_ORG - Your Project Org ID
○ CATALYST_TOKEN - Your catalyst token is generated using the command
- catalyst token:generate
After pasting the above-mentioned code snippet in your main.yml file once you do a
commit, the workflow executes the job mentioned in the main.yml file.
Announcements
Announcing Catalyst Developer Bootcamps in India - Zoho Community
Hey everyone! We're excited to announce a set of developer bootcamps dedicated to Catalyst! These bootcamps are aimed to empower developers to build, scale, and deploy applications with speed and precision, using Catalyst. Whether you're a newcomer or
[Webinar] Upgrade Retail Experiences with Serverless & AI
Ever wondered if you could build lightning-fast, intelligent retail solutions and experiences without touching infrastructure? Join our upcoming live session to explore how you can combine the agility of serverless with the power of large language models
[Webinar] Powering Industry Innovation: Building Unified Solutions with Catalyst
Struggling with fragmented apps or patchwork workflows across teams? Join us for a practical session on how developers are building unified, scalable industry solutions using Catalyst by Zoho—without wrangling with infrastructure. In this live session,
[Webinar] Bridging the Gap: Middleware for Cloud & On-Prem Integration with Catalyst by Zoho
Integrating cloud and on-prem systems can be complex - but it doesn’t have to be. Join us for a live webinar where we break down how middleware simplifies integrations, enhances scalability, and ensures secure data exchange. 🔹 Learn from Experts – Chris
Important Announcements in Support for Catalyst Features
Hello Catalyst Users, This announcement is to bring to your notice some of the recent updates in our support for various Catalyst components, to ensure that your existing Catalyst applications function properly. You can continue to build robust applications