Skip to content

Update actions/checkout to v4 in deploy_hfspaces.yml #21

Update actions/checkout to v4 in deploy_hfspaces.yml

Update actions/checkout to v4 in deploy_hfspaces.yml #21

name: Deploy to Hugging Face Spaces
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Copy the 🤗 Spaces Dockerfile to the root directory of the repository
run: cp -f environments/Dockerfile.space ./Dockerfile
- name: Change branch
run: git checkout -b deploy
- name: Commit Dockerfile.space
run: |
git add Dockerfile
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git commit -m "Deploy to Hugging Face Spaces"
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.PGRABINSKI_HFSPACES_TOKEN }}
run: git push --force https://PGrabinski:[email protected]/spaces/PGrabinski/genAI-detection deploy:main