I migrated my Zoho Catalyst application(Client & Functions) to Github. I wish to deploy my application to Catalyst directly whenever I make a commit to my github repository. I couldn't find the relevant help docs for the same. Can someone help me acheive this?
To create a CI/CD implementation for your Catalyst application from your GitHub Repository, you need to check github worflows. You can find the official help documentation for the same here.
You can try using the below code snippet for main.yml which you would need to add under .github/workflow folder inside your github repository.
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/Node/ && 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 commiting any changes you need to add the below Values in your repository secrets. You can find the help documentation for the same here.
catalyst token:generate
You can find the offical FAQ documentation for the same here.