-
-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (33 loc) · 977 Bytes
/
Copy pathdeploy.yml
File metadata and controls
41 lines (33 loc) · 977 Bytes
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
name: Deploy Streamlit App
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
# - name: Super-Linter
# uses: github/super-linter@v7
# env:
# DEFAULT_BRANCH: main
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r Streamlit/requirements.txt
- name: Clear Streamlit Cache
run: streamlit cache clear || true
- name: Restart Streamlit App
run: |
pkill -f Streamlit.py || true
nohup streamlit run Streamlit/Streamlit.py &
- name: Sleep to Allow App Start
run: sleep 10 # Wait 10 seconds for the app to restart