Write your own CI/CD

Write your own CI/CD

There are several ways to automate your workflow when deploying your application to Clever Cloud from either GitHub or GitLab. This page explains how to write your custom CI/CD from both platforms.

Use Clever Tools

You can write your own pipeline to deploy from either GitHub or GitLab. Use Clever Cloud CLI with either Docker or Node image. Place the following snippets at the top of your .gitlab-ci.yml file:

Using before_script in your GitLab pipeline affects your other scripts as well. Consider including it in a separate job if you run other test scripts unrelated to Clever Cloud deployments in your pipeline.

Mandatory configuration

Your repository must contain at least the following variables to use the CLI:


Find it in your machine, usually in ~/.config/clever-cloud/clever-tools.json, after installing Clever Tools.

⚠️ CLEVER_TOKEN and CLEVER_SECRET expire after one year. Make sure to set a reminder to inject the new ones to avoid breaking your pipelines.

🎓 Go further

Last updated on

Did this documentation help you ?