Add GitHub Action to redeploy the HuggingFace Space on merge to main#177
Merged
Conversation
A new workflow (.github/workflows/deploy-huggingface.yml) runs the same orphan-snapshot push that deploy/huggingface/SETUP.md documents — squash the current tree to one history-free commit (HF rejects the >10 MiB .xiidm blobs in branch history) and force-push it to the Space's main — automatically on every merge to main (plus manual workflow_dispatch). It is inert until the repo sets the HF_TOKEN secret + HF_SPACE variable (and optional HF_USERNAME for org Spaces), so merging it changes nothing until opted in. LFS objects already on the Space are reused, so repeat deploys only upload what changed. SETUP.md documents the required secrets/variables and the opt-in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Re86Rgg2KqgwRigRPFTXnY
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new workflow (.github/workflows/deploy-huggingface.yml) runs the same orphan-snapshot push that deploy/huggingface/SETUP.md documents — squash the current tree to one history-free commit (HF rejects the >10 MiB .xiidm blobs in branch history) and force-push it to the Space's main — automatically on every merge to main (plus manual workflow_dispatch).
It is inert until the repo sets the HF_TOKEN secret + HF_SPACE variable (and optional HF_USERNAME for org Spaces), so merging it changes nothing until opted in. LFS objects already on the Space are reused, so repeat deploys only upload what changed. SETUP.md documents the required secrets/variables and the opt-in.
Claude-Session: https://claude.ai/code/session_01Re86Rgg2KqgwRigRPFTXnY