I'm wondering what's the best way to publically share on Github a file that's on a private repo on Github.
I would like thet every time a make a push in my private repository automatically the file is updated too.
In particular I have a .tex project: I would like to keep secret the tex files but I would like to make available to everyone the pdf file.
Note I'm aware of the existence of the gitignore option, but I don't want to use it since I want to keep track of the improvements on the tex files
I would like to keep secret the tex files but I would like to make available to everyone the pdf file.
You can dedicate a public repo (with a simple README
in it) in order to upload and associate to said public repo an artifact (your pdf) as a GitHUb release.
Add that public repo as a submodule of your private repo: that will create a subfolder with the README in it, explaining where to find the pdf (in the release section of the public repo)
You can then, from your own private repo:
All those steps can be scripted, using the GitHub API: here is an example (focused on the release upload part) in bash shell.
Github does not provide such functionality. Github repositories are either public or private, both not both. However, if the part you want to share is small enough (let' say 4-5 files) you can create a public gist. Unfortunately, there is no way to update the gist automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With