Syncing Github Repo with Huggingface Repo

Hello there,

I am trying to make my github repo sync with huggingface space, so I can get the new changes deployed directly after a push to github.

I followed the tutorial here and setup the actions pipeline- Managing Spaces with Github Actions

My problem is with the README.md file, I want a different README.md file for my github repo cause the README.md file inside spaces is related to configuration. I am having hardtime maintaining a single version and making sure that works for both repos. How do I effectively manage in this case?

1 Like

I think the simplest thing is .gitignore, but this just ignores README.md
It’s a little different from managing multiple repositories at the same time.
https://git-scm.com/docs/gitignore

Yeah, I don’t think that’s the way to go.

1 Like

You could achieve this by placing the README intended for GitHub in .github directory, and the one for Hugging Face Hub in the root:

If you put your README file in your repository’s hidden .github, root, or docs directory, GitHub will recognize and automatically surface your README to repository visitors.
If a repository contains more than one README file, then the file shown is chosen from locations in the following order: the .github directory, then the repository’s root directory, and finally the docs directory.

1 Like