feat: describe your change

#2
Files changed (2) hide show
  1. README.md +16 -0
  2. scripts/push-space-via-pr.sh +20 -0
README.md CHANGED
@@ -11,3 +11,19 @@ pinned: false
11
  ---
12
 
13
  AI Puppet Theater is a public Gradio Space for building short interactive puppet shows from a user premise.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
  AI Puppet Theater is a public Gradio Space for building short interactive puppet shows from a user premise.
14
+
15
+ ## Updating the hackathon Space
16
+
17
+ The org Space may **reject `git push`** (even on a new branch) when your role must contribute via **Pull Requests** on the Hub. That shows up as `You are not authorized to push to this repo`.
18
+
19
+ Use the Hub API with a PR instead (uses `hf auth login`, not Git’s keychain):
20
+
21
+ ```bash
22
+ hf auth login # token with access to this Space
23
+ ./scripts/push-space-via-pr.sh "feat: your change summary"
24
+ ```
25
+
26
+ Then open the PR link printed in the terminal and **merge** it on Hugging Face so `main` updates and the Space rebuilds.
27
+
28
+ To point at another Space, set `HF_SPACE_REPO` (for example `YourUser/your-space-name`).
29
+
scripts/push-space-via-pr.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Push local tree to the hackathon Space using a Hub Pull Request (required when
3
+ # direct git push is disabled for org Spaces). Uses `hf` auth, not Git credentials.
4
+ set -euo pipefail
5
+ cd "$(dirname "$0")/.."
6
+
7
+ REPO_ID="${HF_SPACE_REPO:-build-small-hackathon/AI-Puppet-Theater}"
8
+ MSG="${1:-chore: update Space}"
9
+
10
+ exec hf upload "$REPO_ID" . . --repo-type space \
11
+ --exclude ".git/**" \
12
+ --exclude ".venv/**" \
13
+ --exclude ".uv-cache/**" \
14
+ --exclude "__pycache__/**" \
15
+ --exclude "*.py[cod]" \
16
+ --exclude ".pytest_cache/**" \
17
+ --exclude ".ruff_cache/**" \
18
+ --exclude ".DS_Store" \
19
+ --create-pr \
20
+ --commit-message "$MSG"