Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update managing spaces with GitHub actions page #1444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/hub/spaces-github-actions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Managing Spaces with Github Actions
# Managing Spaces with GitHub Actions

You can keep your app in sync with your GitHub repository with **Github Actions**. Remember that for files larger than 10MB, Spaces requires Git-LFS. If you don't want to use Git-LFS, you may need to review your files and check your history. Use a tool like [BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/) to remove any large files from your history. BFG Repo-Cleaner will keep a local copy of your repository as a backup.

Expand Down Expand Up @@ -32,10 +32,11 @@ jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
Expand All @@ -58,8 +59,13 @@ jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Check large files
uses: ActionsDesk/lfs-warning@v2.0
uses: ActionsDesk/lfs-warning@v3.3
with:
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
```