Skip to content

docs: add hub-sync GitHub Action to repo and Spaces docs#2361

Merged
davanstrien merged 3 commits intomainfrom
docs/hub-sync-action
Apr 8, 2026
Merged

docs: add hub-sync GitHub Action to repo and Spaces docs#2361
davanstrien merged 3 commits intomainfrom
docs/hub-sync-action

Conversation

@davanstrien
Copy link
Copy Markdown
Member

@davanstrien davanstrien commented Apr 7, 2026

Summary

  • Add new general-purpose GitHub Actions page under Repositories section covering huggingface/hub-sync for Models, Datasets, and Spaces
  • Update Spaces GitHub Actions page to recommend hub-sync as the primary approach, keeping manual git push as a fallback
  • Clarify that the action mirrors files (via hf CLI) rather than syncing git history

Context

The official huggingface/hub-sync GitHub Marketplace Action was shipped, but the docs still only showed the old manual git push workflow and were Spaces-specific. This PR updates the docs and adds a general page since the action supports all repo types.

Smoke-tested with a real repo: davanstrien/test-hub-syncSpace

Test plan

  • Verify new page renders correctly at /docs/hub/repositories-github-actions
  • Verify updated Spaces page renders correctly at /docs/hub/spaces-github-actions
  • Check toctree navigation shows "GitHub Actions" under Repositories

Note

Low Risk
Low risk documentation-only change; main risk is broken links or confusing workflow snippets if the action parameters/version drift.

Overview
Adds a new Repositories -> GitHub Actions doc page describing how to sync GitHub repos to the Hub using the official huggingface/hub-sync action (including setup, example workflows, and parameter reference).

Updates spaces-github-actions.md to recommend hub-sync as the primary approach, explains that it mirrors files via the hf CLI (not git history), keeps manual git push as an alternative, and links to the new general page. Also updates the Hub docs sidebar (_toctree.yml) to include the new GitHub Actions page.

Reviewed by Cursor Bugbot for commit c73a22e. Bugbot is set up for automated code reviews on this repo. Configure here.

davanstrien and others added 2 commits April 7, 2026 15:48
Add a new general-purpose GitHub Actions page under Repositories
covering huggingface/hub-sync for Models, Datasets, and Spaces.
Update the Spaces-specific page to lead with hub-sync while keeping
the manual git push approach as a fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep it to a short note about the LFS requirement rather than
maintaining a separate third-party action reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Recommend fine-grained tokens scoped to the target repo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@davanstrien
Copy link
Copy Markdown
Member Author

cc @alozowski @Wauplin

Copy link
Copy Markdown
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @glutamatt too

Copy link
Copy Markdown
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not 🤷

@davanstrien davanstrien merged commit 8c24232 into main Apr 8, 2026
3 checks passed
@davanstrien davanstrien deleted the docs/hub-sync-action branch April 8, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants