modul-s / .github /workflows /hf-docker-space-deploy.yml
sitcod3's picture
Upload folder using huggingface_hub
094f206 verified
Raw History Blame Contribute Delete
1.06 kB
name: Deploy to Hugging Face Space
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
validate-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: |
rm -rf node_modules package-lock.json
npm install
- name: Type check
run: npm run lint
- name: Test
run: npm run test
continue-on-error: true
- name: Build
run: npm run build
- name: Deploy to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config --global user.email "sitcod3@users.noreply.huggingface.co"
git config --global user.name "sitcod3"
git remote add huggingface https://user:$HF_TOKEN@huggingface.co/spaces/sitcod3/BRIDGE_Modul-S_prod.git
git push --force huggingface main