Useful snippets

Github Actions 

It’s a common pattern to auto-deploy your Modal as part of your CI/CD pipeline. To get you started, here’s a sample Github Actions workflow that deploys your app on every push to the main branch.

This requires you to create a Modal token and add it as a secret for your Github Actions workflow. Finally, you can create a new workflow file in your repository at .github/workflows/ci-cd.yml with the following contents (be sure to replace my_package.my_file with your actual entrypoint).