Add skill for deploying to Community Cloud#13
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new skill for deploying Streamlit applications to Community Cloud using the upcoming streamlit cloud deploy CLI command (planned for Streamlit 1.54). The skill provides step-by-step instructions for AI assistants to help users deploy apps, including handling Git repository initialization and GitHub remote setup when needed.
Changes:
- Adds new
deploying-streamlit-community-cloudskill with deployment workflow instructions - Updates README.md to document the new deployment skill alongside the existing development skill
- Adjusts table formatting in README.md for better alignment
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| deploying-streamlit-community-cloud/SKILL.md | New skill file providing deployment workflow instructions including version checking, Git/GitHub setup, and CLI command usage |
| README.md | Updates documentation to reflect two top-level skills and improves table formatting consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| git add -A | ||
| git commit -m "Initial commit" | ||
| gh auth status | ||
| gh repo create <repo-name> --source=. --remote=origin --push |
There was a problem hiding this comment.
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."
| ## What the command does | ||
|
|
||
| `streamlit cloud deploy` opens the Streamlit Community Cloud deploy page with | ||
| the repository, branch, and app file pre-filled for the current GitHub repo. |
There was a problem hiding this comment.
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. |
|
|
||
| ```bash | ||
| git init | ||
| git add -A |
There was a problem hiding this comment.
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.
| gh repo create <repo-name> --source=. --remote=origin --push | ||
| ``` | ||
|
|
||
| Notes: | ||
|
|
||
| - If `gh auth status` fails, run `gh auth login` first. | ||
| - Use `--public` or `--private` depending on the user's preference. |
There was a problem hiding this comment.
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.
| 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. |
There was a problem hiding this comment.
The version check using streamlit version will return version information, but the skill doesn't provide guidance on how to parse and compare the version number to determine if it's >= 1.54. The AI agent needs explicit instructions on how to extract the version number from the command output and compare it. Consider adding a note like: "Parse the version output and verify it's 1.54.0 or higher before proceeding."
| 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. |
| git remote -v | ||
| ``` | ||
|
|
||
| If the repo has a GitHub remote (URL contains `github.com`), run: |
There was a problem hiding this comment.
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.
| --- | ||
| 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. | ||
| --- |
There was a problem hiding this comment.
Missing license field in frontmatter. All other skills in this repository include license: Apache-2.0 on line 4 of their frontmatter. For consistency with the established convention, add this field to match the pattern seen in all sub-skills under developing-with-streamlit/skills/.
| ```bash | ||
| git init | ||
| git add -A | ||
| git commit -m "Initial commit" | ||
| gh auth status | ||
| gh repo create <repo-name> --source=. --remote=origin --push | ||
| ``` | ||
|
|
||
| Notes: | ||
|
|
||
| - If `gh auth status` fails, run `gh auth login` first. | ||
| - Use `--public` or `--private` depending on the user's preference. | ||
| - If there are already commits, skip the initial commit step. |
There was a problem hiding this comment.
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.
Adds a skill to deploy apps to Community Cloud. This requires the new
streamlit cloud deploycommand we're planning to add in 1.54 (streamlit/streamlit#13651), so should only be merged after 1.54 is released.