Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with deploying binary files? #92

Closed
rschmehl opened this issue Jun 8, 2022 · 9 comments
Closed

Problem with deploying binary files? #92

rschmehl opened this issue Jun 8, 2022 · 9 comments

Comments

@rschmehl
Copy link

rschmehl commented Jun 8, 2022

I am using this action to deploy a server-side built PDF to a gist. For some reason, the PDF deposited in the gist is different from the PDF that was built on the github server. The deposited PDF is about twice as large and corrupt. I have narrowed down the problem to the actual file transfer. Is it possible that this action is limited to ASCII files?

@rschmehl
Copy link
Author

rschmehl commented Jun 8, 2022

The line in run.ts const content = await fs.readFile(filePath, 'utf-8') suggests this...

@exuanbo
Copy link
Owner

exuanbo commented Jun 8, 2022

I found that posting binary files to Gists via the HTTP API is not supported.

The only workaround seems to be to use git:

# https://gist.github.com/remarkablemark/feff40b0a522f0c41c4eff0b77ea1d47

# with ssh
git clone [email protected]:<hash>.git gist

# with https
git clone https://gist.github.com/<hash>.git gist

cp BINARY gist

cd gist
git add BINARY
git commit -m "Add BINARY"
git push origin master

I will find a way to implement this in the next few days.

@exuanbo
Copy link
Owner

exuanbo commented Jun 10, 2022

I just released a new patch version, hopefully it will solve the problem :)

@rschmehl
Copy link
Author

rschmehl commented Jun 10, 2022

I am still getting this message

Run exuanbo/[email protected] Dump inputs Deploy to gist [INFO] Action failed with "Error: Pushing to https://gist.github.com/3f94046cad52b8cffbe398bc0c61bfcd.git\\ error: src refspec master does not match any\\ error: failed to push some refs to 'https://gist.github.com/3f94046cad52b8cffbe398bc0c61bfcd.git' "

@exuanbo
Copy link
Owner

exuanbo commented Jun 10, 2022

I have released another patch version. This should be fixed now.

@exuanbo
Copy link
Owner

exuanbo commented Jun 11, 2022

I can't reproduce the error in your previous (deleted?) comment. Is it working properly now?

@rschmehl
Copy link
Author

Thanks. Upon closer look, the error in the previous comment (deleted) was due to exceeded quota in the gist repository. The PDF that was deployed by this action is around 15 MB in size and with frequent pushes to the repository and Latex builds the quota was reached. So, entirely unrelated to your code. I will check this later with a new gist and will report here.

@rschmehl
Copy link
Author

Next thing I found out is that LFS cannot be used on Gist repositories. I wanted to use LFS because I am not interested in keeping the deployment history of the binary (and because it is large, which rapidly brings the gist repo to exceeding its quota). Will try now without LFS...

@rschmehl
Copy link
Author

Yes, it does work now, using the new binary option. Thanks a lot for implementing this.

@exuanbo exuanbo closed this as completed Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants