-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) Β· 1.91 KB
/
Copy pathstreamlit.yml
File metadata and controls
62 lines (52 loc) Β· 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# ---------------------------------------------------------------------------
# Streamlit Community Cloud β CI Validation Workflow
#
# Streamlit Community Cloud auto-deploys directly from GitHub when the
# GitHub App integration is configured on the Streamlit Cloud dashboard.
# This workflow acts as a CI gate that validates the app on every push to
# master so broken code never reaches the live deployment.
#
# Setup checklist (one-time, done in the Streamlit Cloud dashboard):
# 1. Go to https://share.streamlit.io and sign in with GitHub.
# 2. Click "New app" β select this repo β branch: master
# 3. Set Main file path: autoblogs/ui/app.py
# 4. Click "Deploy" β Streamlit Cloud will re-deploy on every master push.
# ---------------------------------------------------------------------------
name: Streamlit Community Cloud
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
validate:
name: Validate App for Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Validate Python Syntax
run: |
python -m py_compile autoblogs/ui/app.py
echo "Syntax OK: autoblogs/ui/app.py"
- name: Check App Can Be Imported
run: |
python -c "import autoblogs; print('Package import OK β version:', autoblogs.__version__)"
- name: Verify Streamlit Entry Point Exists
run: |
test -f autoblogs/ui/app.py || (echo "ERROR: app.py not found" && exit 1)
echo "Entry point confirmed: autoblogs/ui/app.py"