Update actions/checkout to v4 in deploy_hfspaces.yml #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |