docs: how to "manage your Space via GitHub"
Browse files
README.md
CHANGED
@@ -11,7 +11,7 @@ app_port: 3000
|
|
11 |
|
12 |
# nextjs-docker-starter
|
13 |
|
14 |
-
This
|
15 |
|
16 |
## Development
|
17 |
|
@@ -45,6 +45,15 @@ This will build the project as a standalone app inside the Docker image.
|
|
45 |
|
46 |
## Manage your Space via GitHub
|
47 |
|
48 |
-
If you want to use all the features for collaborative development on GitHub, but keep your demo on Spaces, then you can
|
49 |
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
# nextjs-docker-starter
|
13 |
|
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).
|
15 |
|
16 |
## Development
|
17 |
|
|
|
45 |
|
46 |
## Manage your Space via GitHub
|
47 |
|
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.
|
49 |
|
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).
|