1. Get your Cerebrium OAuth credentials
Cerebrium stores your credentials in the directory ~/.cerebrium/config.yaml. If you run the command ‘cat ~/.cerebrium/config’ then you should see an output of 3 variables, namely:- accessToken
- refreshToken
- projectId
2. Define secrets in your github enviornment
Go to your Github respository -> Settings -> Enviorenments
You shoud create a new environment with a title of your choice (prod and dev). Within these environments you have two types
of variables you can work with:
- Environment secrets: These are encrypted and do not show in your workflows logs
- Environment variables: These are not encrypted and so will show in the workflow logs.
3. Github Actions Workflow
In this flow, we do the following:- Install a python version of our choice (3.8 to 3.11)
- Pip install the cerebrium package
- Login to Cerebrium using our credentials
- Deploy our model
- Notify a Slack channel of successful deployment