Deploying different apps from same github script

Hello all,

I have configured a streamlit app to use environment variables (secrets in streamlit cloud) for configuration. I’d like to now deploy multiple versions of this app with different configs from within my streamlit cloud workspace.

However it seems that I can only deploy one app from my streamlit cloud workspace per github script? Whenever I try to deploy a new app from the same github script, it just redeploys the single app attached to that script.

One work around is maybe to fork the repo and deploy it form another workspace. But this isn’t that elegant. Do you have any ideas?

Thanks,
Jeff

Hey @jeffkayne,

The best solution for this is probably to set up multiple branches of the GitHub repository and then deploy each of those branches separately

2 Likes

You can store multiple copies of the same script. If you are worried about maintainability, make them just import another module and call its main() function, so that all the logic is in one module and each script is just two lines of boilerplate.

2 Likes

Indeed that works, thank you :smiley:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.