muddasser's picture
Update HF_TOKEN to use HF_API_KEY secret
a5eebe1 unverified
raw
history blame contribute delete
897 Bytes
name: CICD Prophet
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install
run: pip install -r requirements.txt && pip install pytest
- name: Test
run: pytest tests/test_app.py -v
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to HF
env:
HF_TOKEN: ${{ secrets.HF_API_KEY }}
run: |
git config --global user.email "ci@github.com"
git config --global user.name "GitHub CI"
git remote add hf https://user:${HF_TOKEN}@huggingface.co/spaces/muddasser/ci_cd_prophet
git push hf main --force