-
Notifications
You must be signed in to change notification settings - Fork 4
Add skill for deploying to Community Cloud #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,81 @@ | ||||||||||||||||||
| --- | ||||||||||||||||||
| name: deploying-streamlit-community-cloud | ||||||||||||||||||
| description: Deploys Streamlit apps to Streamlit Community Cloud using the Streamlit CLI. Use when publishing an app or turning a local project into a GitHub repo for deployment. | ||||||||||||||||||
| --- | ||||||||||||||||||
|
|
||||||||||||||||||
| # Deploying to Streamlit Community Cloud | ||||||||||||||||||
|
|
||||||||||||||||||
| Use this skill to deploy a Streamlit app to Streamlit Community Cloud via the | ||||||||||||||||||
| `streamlit cloud deploy` CLI command (Streamlit 1.54+). | ||||||||||||||||||
|
|
||||||||||||||||||
| ## When to activate | ||||||||||||||||||
|
|
||||||||||||||||||
| - Publishing a Streamlit app to Community Cloud | ||||||||||||||||||
| - Converting a local project into a GitHub repo for deployment | ||||||||||||||||||
| - Triggering a deploy from the CLI | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Requirements | ||||||||||||||||||
|
|
||||||||||||||||||
| - **Streamlit 1.54+** (for `streamlit cloud deploy`) | ||||||||||||||||||
| - A GitHub repo with your app code | ||||||||||||||||||
| - A Community Cloud account connected to GitHub | ||||||||||||||||||
| - `gh` CLI installed and authenticated if a repo needs to be created | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Deployment flow | ||||||||||||||||||
|
|
||||||||||||||||||
| ### 1) Verify Streamlit version | ||||||||||||||||||
|
|
||||||||||||||||||
| ```bash | ||||||||||||||||||
| streamlit version | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| If `streamlit cloud deploy` is missing or Streamlit is <1.54, **tell the user | ||||||||||||||||||
| explicitly that they need Streamlit 1.54 for this skill to work** and ask them | ||||||||||||||||||
| to upgrade before continuing. | ||||||||||||||||||
|
Comment on lines
+32
to
+34
|
||||||||||||||||||
| If `streamlit cloud deploy` is missing or Streamlit is <1.54, **tell the user | |
| explicitly that they need Streamlit 1.54 for this skill to work** and ask them | |
| to upgrade before continuing. | |
| Parse the command output to extract the Streamlit version string (for example | |
| `X.Y.Z`) and verify that it is **1.54.0 or higher** before proceeding. | |
| If `streamlit cloud deploy` is missing or the parsed Streamlit version is | |
| lower than 1.54.0, **tell the user explicitly that they need Streamlit 1.54 | |
| or newer for this skill to work** and ask them to upgrade before continuing. |
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check on line 43 looks for github.com in the remote URL, but GitHub Enterprise users may have different domain names (e.g., github.company.com). Consider broadening the check or adding a note about GitHub Enterprise compatibility, or prompt the user to confirm whether their remote is a valid GitHub remote.
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git add -A command will stage all files including those that should typically be ignored (e.g., .env, secrets.toml, __pycache__, .venv). Before running this command, the workflow should ensure a .gitignore file exists with appropriate Streamlit and Python exclusions. Consider adding a step to check for and create a .gitignore file if it doesn't exist, or warn the user to review staged files before committing.
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gh repo create command uses a placeholder <repo-name> without guidance on how to determine or prompt for the repository name. The AI agent needs clear instructions on how to derive or ask for this value. Consider adding explicit guidance such as: "Prompt the user for a repository name, or suggest using the current directory name as the default."
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The note on line 65 mentions using --public or --private flags for the gh repo create command, but these flags are not included in the actual command on line 59. The instruction should either include these flags in the command with a placeholder (e.g., gh repo create <repo-name> --source=. --remote=origin --push --public) or clarify that the AI should determine and add the appropriate flag based on user preference before running the command.
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow sequence could fail if the directory already has uncommitted changes or existing commits. The instructions should check for existing commits before running git commit, as noted in line 66, but this check should happen before attempting the commit command on line 57. Consider reordering the flow to check git log or git rev-parse HEAD first to determine if commits already exist, and only run git init, git add -A, and git commit if the repository is truly uninitialized.
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions mention that streamlit cloud deploy will pre-fill "the repository, branch, and app file" but don't explain how the command determines which app file to use. This could be unclear for projects with multiple Python files. Consider adding guidance on how the command selects the app file (e.g., does it use streamlit_app.py by default, or does it prompt the user?).
| the repository, branch, and app file pre-filled for the current GitHub repo. | |
| the repository and branch pre-filled for the current GitHub repo. For the app | |
| file, Streamlit tries to detect a likely entrypoint (for example, a | |
| `streamlit_app.py` or `app.py` in the repo root). If multiple candidates are | |
| found, or none can be confidently detected, the deploy UI prompts the user to | |
| select which Python file to run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing license field in frontmatter. All other skills in this repository include
license: Apache-2.0on line 4 of their frontmatter. For consistency with the established convention, add this field to match the pattern seen in all sub-skills underdeveloping-with-streamlit/skills/.