rootstock icon indicating copy to clipboard operation
rootstock copied to clipboard

Deploy built DOCX to Github pages

Open habi opened this issue 2 years ago • 4 comments

I've started a new manuscript and think I need an easily accessible DOCX file for the co-authors. The DOCX file is built correctly, but not accessible at https://habi.github.io/EAWAG-manuscript/manuscript.docx as I would expect. How can I deploy/copy the DOCX file to GitHub pages to make it easily accessible for my co-authors?

habi avatar Jul 07 '22 15:07 habi

That has to do with the deploy script. The current behavior is to commit the files written in the output directory to the output branch, which includes the docx file, and to commit the files written to the webpage directory to the gh-pages branch, which does not include the docx file.

You could probably modify deploy.sh to copy the docx output file into the webpage directory before this command makes the commit to the gh-pages branch:

ghp-import \
  --no-jekyll \
  --follow-links \
  --push \
  --branch=gh-pages \
  --message="$MESSAGE" \
  webpage

If you want to try doing that, I can give more detail. It should even be possible to track the versions of the docx file in the versioned GitHub pages URLs.

agitter avatar Jul 07 '22 21:07 agitter

Noting that the DOCX is getting saved to the output branch, so if you are okay with a URL like https://github.com/habi/EAWAG-manuscript/raw/output/manuscript.docx that might be all you need.

dhimmel avatar Jul 08 '22 16:07 dhimmel

Maybe adding a link from the manuscript front matter to that output branch URL would be a quick solution? It's much easier than modifying the deploy script.

agitter avatar Jul 08 '22 17:07 agitter

I'll try to fiddle with the deploy script, but having a link to the output branch is a quick and easy solution, yeah!

habi avatar Jul 09 '22 20:07 habi