Claude Claude Opus 4.8 commited on
Commit
24361e0
Β·
unverified Β·
1 Parent(s): 1520970

Default HF sync to Sri-28/docuask and fill in demo link

Browse files

Defaults HF_USERNAME to Sri-28 so only the HF_TOKEN secret is required to
enable auto-sync; sets the live-demo link to the target Space URL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WN4QRr6dTE2W7hQ2SDnLmY

Files changed (2) hide show
  1. .github/workflows/sync-to-hf.yml +4 -7
  2. README.md +5 -5
.github/workflows/sync-to-hf.yml CHANGED
@@ -6,8 +6,9 @@ name: Sync to Hugging Face Space
6
  #
7
  # One-time setup (GitHub β†’ Settings β†’ Secrets and variables β†’ Actions):
8
  # - Secret HF_TOKEN : a Hugging Face access token with write scope
9
- # (huggingface.co/settings/tokens).
10
- # - Variable HF_USERNAME : your Hugging Face username / org that owns the Space.
 
11
  # - Variable HF_SPACE : the Space name (optional; defaults to "docuask").
12
  #
13
  # Until HF_TOKEN is set the job no-ops, so this workflow never fails the branch.
@@ -48,13 +49,9 @@ jobs:
48
  if: steps.check.outputs.ok == 'true'
49
  env:
50
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
51
- HF_USERNAME: ${{ vars.HF_USERNAME }}
52
  HF_SPACE: ${{ vars.HF_SPACE || 'docuask' }}
53
  run: |
54
- if [ -z "$HF_USERNAME" ]; then
55
- echo "::error::Set the HF_USERNAME repository variable to your Hugging Face username."
56
- exit 1
57
- fi
58
  echo "Syncing to https://huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE}"
59
  git push --force \
60
  "https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE}.git" \
 
6
  #
7
  # One-time setup (GitHub β†’ Settings β†’ Secrets and variables β†’ Actions):
8
  # - Secret HF_TOKEN : a Hugging Face access token with write scope
9
+ # (huggingface.co/settings/tokens). REQUIRED.
10
+ # - Variable HF_USERNAME : Hugging Face username that owns the Space
11
+ # (optional; defaults to "Sri-28").
12
  # - Variable HF_SPACE : the Space name (optional; defaults to "docuask").
13
  #
14
  # Until HF_TOKEN is set the job no-ops, so this workflow never fails the branch.
 
49
  if: steps.check.outputs.ok == 'true'
50
  env:
51
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
52
+ HF_USERNAME: ${{ vars.HF_USERNAME || 'Sri-28' }}
53
  HF_SPACE: ${{ vars.HF_SPACE || 'docuask' }}
54
  run: |
 
 
 
 
55
  echo "Syncing to https://huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE}"
56
  git push --force \
57
  "https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE}.git" \
README.md CHANGED
@@ -20,8 +20,8 @@ live dashboard. It's a small, end-to-end product loop: a React front end, a
20
  FastAPI back end, a lightweight retrieval layer, and a SQLite telemetry layer,
21
  all runnable with one command and deployable as a single container.
22
 
23
- πŸ”— **Live demo:** _deploy to a Hugging Face Space (see [Deploy](#deploy-hugging-face-spaces)) and paste the URL here_ β†’
24
- `https://huggingface.co/spaces/<your-username>/docuask`
25
 
26
  ## Screenshots
27
 
@@ -116,9 +116,9 @@ Space's variables.
116
  your Space on every push. Configure it once under **Settings β†’ Secrets and
117
  variables β†’ Actions**:
118
 
119
- - Secret `HF_TOKEN` β€” a Hugging Face token with write scope.
120
- - Variable `HF_USERNAME` β€” your Hugging Face username (and `HF_SPACE` if the
121
- Space isn't named `docuask`).
122
 
123
  Until `HF_TOKEN` is set the workflow no-ops, so it never fails the branch.
124
 
 
20
  FastAPI back end, a lightweight retrieval layer, and a SQLite telemetry layer,
21
  all runnable with one command and deployable as a single container.
22
 
23
+ πŸ”— **Live demo:** [huggingface.co/spaces/Sri-28/docuask](https://huggingface.co/spaces/Sri-28/docuask)
24
+ _(goes live once the Space is created β€” see [Deploy](#deploy-hugging-face-spaces))_
25
 
26
  ## Screenshots
27
 
 
116
  your Space on every push. Configure it once under **Settings β†’ Secrets and
117
  variables β†’ Actions**:
118
 
119
+ - Secret `HF_TOKEN` β€” a Hugging Face token with write scope. **This is the only
120
+ required step** (username defaults to `Sri-28`, Space to `docuask`).
121
+ - Optionally override the `HF_USERNAME` / `HF_SPACE` variables.
122
 
123
  Until `HF_TOKEN` is set the workflow no-ops, so it never fails the branch.
124