Skip to content

Commit

Permalink
Merge pull request #7 from canstralian/canstralian-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
canstralian authored Feb 2, 2025
2 parents c08c427 + 87769e1 commit 6aeaf91
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,60 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8' # Specify your Python version here

python-version: '3.8'

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pytest # Make sure you have pytest in your requirements.txt
pytest
deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'


- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Streamlit
run: |
pip install streamlit
- name: Deploy to Hugging Face
env:
HUGGINGFACE_TOKEN: ${{ secrets.HF_TOKEN }} # Use the correct secret name
HUGGINGFACE_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# Assuming you have a deployment script to deploy your app
streamlit run your_app.py --server.port 8501 --server.address 0.0.0.0

0 comments on commit 6aeaf91

Please sign in to comment.