name: Deploy to Hugging Face Space on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v4 - name: Push to Hugging Face env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git config --global user.email "github-actions@github.com" git config --global user.name "github-actions" git clone https://user:$HF_TOKEN@huggingface.co/spaces/greedybeserk95/Compilertetris space rsync -av --exclude ".git" ./ space/ cd space git add . git commit -m "Auto deploy from GitHub" || echo "No changes" git push