FEAT Add GH action to deploy method comparison app #4
Workflow file for this run
This file contains hidden or 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 "method_comparison" Gradio to Spaces | |
on: | |
pull_request: | |
branches: [ main ] # TODO remove | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # full history needed for subtree | |
- name: Install HF Hub CLI and authenticate | |
env: | |
HF_TOKEN: ${{ secrets.PEFT_INTERNAL_REPO_READ_WRITE }} | |
run: | | |
pip install huggingface_hub | |
huggingface-cli login --token "${HF_TOKEN}" | |
- name: Deploy method_comparison app to HF Spaces | |
run: | | |
cd method_comparison | |
git init | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git remote add gradio-app https://huggingface.co/spaces/peft-internal-testing/PEFT-method-comparison | |
git add . | |
git commit -m "🚀 Deploy method comparison app from GH action" | |
git push -f gradio-app HEAD:main |