Skip to content

Commit d69324d

Browse files
committed
docs: how to "manage your Space via GitHub"
1 parent 49d1dc3 commit d69324d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ app_port: 3000
1111

1212
# nextjs-docker-starter
1313

14-
This example can be used to run [Next.js](https://nextjs.org/) using [Docker](https://huggingface.co/docs/hub/spaces-sdks-docker) in 🤗 [Spaces](https://huggingface.co/spaces).
14+
This starter can be used to run [Next.js](https://nextjs.org/) using [Docker](https://huggingface.co/docs/hub/spaces-sdks-docker) in 🤗 [Spaces](https://huggingface.co/spaces).
1515

1616
## Development
1717

@@ -45,6 +45,15 @@ This will build the project as a standalone app inside the Docker image.
4545

4646
## Manage your Space via GitHub
4747

48-
If you want to use all the features for collaborative development on GitHub, but keep your demo on Spaces, then you can setup a GitHub action that will automatically push changes from GitHub into Spaces.
48+
If you want to use all the features for collaborative development on GitHub, but keep your demo on Spaces, then you can set up a GitHub action that will automatically push changes from GitHub into Spaces.
4949

50-
https://huggingface.co/docs/hub/spaces-github-actions
50+
1. Create your repo on GitHub
51+
2. Create a [Github secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named `HF_TOKEN` and use an [access token from Hugging Face](https://huggingface.co/settings/tokens) as its value (you must be logged in to do this)
52+
3. Update the workflow [sync_to_hf_spaces.yml](.githug/worfkows/sync_to_hf_spaces.yml)
53+
a. Configure `HF_USERNAME` with the name of your user or your organization
54+
b. Configure `HF_SPACE_NAME` with the name of your space
55+
4. Push the code into your repo on GitHub
56+
57+
This should force push changes in the **main** branch from GitHub into your 🤗 space.
58+
59+
For further information, you can check out the [guide on Hugging Face](https://huggingface.co/docs/hub/spaces-github-actions).

0 commit comments

Comments
 (0)