Skip to content
name: Python Streamlit App CI/CD
on:
push:
branches:
- main
- release/*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Pipenv
run: |
python -m pip install --upgrade pip
pip install pipenv
- name: Install Streamlit
run: pip install streamlit
- name: Install dependencies
run: pipenv install
env:
PIPENV_VENV_IN_PROJECT: 1 # To ensure that the virtual environment is created within the project directory
- name: Build package
run: |
streamlit run app.py &
sleep 5 # Adjust the sleep time as needed
pkill -f "streamlit run app.py"