Install the dependencies.
python -m pip install -r requirements.txtSet up the Modal project.
python -m modal setupRun the development server. Live-reload might be supported on your system.
python -m modal serve main.pyRetrieve and store your environment variables:
Retrieve your Modal API token:
https://modal.com/settings/{workspace}/tokens
Add the Modal Token to GitHub Secrets:
- Navigate to your GitHub repository.
- Go to Settings > Secrets and variables > Actions.
- Click on New repository secret.
- Name the secret
MODAL_TOKEN_IDand paste the Modal token ID you generated. - Name the secret
MODAL_TOKEN_SECRETand paste the Modal token secret you generated.
Push a commit to the main branch of your GitHub repository to trigger a deployment.