Spaces:
Running
Running
name: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- 'data/**' | |
- 'docs/**' | |
- 'app.py' | |
- 'README.md' | |
- 'requirements.txt' | |
- 'index.html' | |
- 'LICENSE' | |
- '.github/workflows/push_spaces.yaml' | |
- 'spitfight/**' | |
concurrency: | |
group: ${{ github.ref }}-hfpush | |
cancel-in-progress: true | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
if: github.event.repository.fork == false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
ref: master | |
- name: Push to Space | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: | | |
git lfs install | |
for i in 1 2 3 4 5; do | |
git push -f https://jaywonchung:[email protected]/spaces/ml-energy/leaderboard master:main && break || sleep 5; | |
done | |