GitHub: can I offer access to compiled files without versioning them?
Asked Answered
C

3

8

I maintain a documentation with git and GitHub. The source files are TEX files for Pdflatex an a few other files (like figures) that are used for the compilation. These files are versioned. After compilation, they produce a PDF file (that explains all the details of my project).

There is no need to version that resulting PDF file, because it is constructed from source. Versioning that compiled PDF would be a waist of resource.

However, I would like that people who check out my GitHub repository can read the last compiled PDF immediately, so that they don't need to compile themselves. Such possibility would be appreciated by people who just want to have a quick look, wouldn't it?

How can this be done with GitHub?

Cadmium answered 22/6, 2012 at 13:24 Comment(0)
W
9

You have a download page available at http://github.com/user/project/downloads. You can handle this automatically with their API if needed.

Edit: As noted by Thomas, the download API has been deprecated since, and has been replaced by another workflow called "Releases". You can then attach binary files to a specific release.

Drag and drop binary

Wristlet answered 22/6, 2012 at 13:29 Comment(0)
L
4

Yes, you can do this. Go to the "Downloads" tab and upload your PDF file. Other users will be able to see it.

That's the tab right there

Lieutenancy answered 22/6, 2012 at 13:28 Comment(0)
C
1

As far as I'm aware, this isn't something that can be done in the way you want it. Imagine someone reverses the branch to an older version. If the PDF isn't versioned, what happens to it?

git is quite efficient in how it does its versioning and unless your PDF is really large, it should be fine to just leave it in if you really want it there when the users pull.

Personally, I recommend that you don't include the PDF in the branch, and simply make use of GitHub's download page. It allows you to put up files related to your project that don't necessarily go with the source. This is normally used by developers to put up tarballs of their release builds and such.

Cumshaw answered 22/6, 2012 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.