Open aanomm opened 9 years ago
Hi there,
Did you consider just having your GitHub pages root outside of build
, and simply copying the built files over to the repo after a build is complete?
Cheers,
I have it outside of the build folder @krallin. I have to because Github Pages require a CNAME file for custom domains, which Cactus wipes clean every build. So I am coping all the files after every change at the moment, which seems so prehistoric. I just figured there must be some automated way around this?
You could write a plugin that creates / copies the file after the build. Would that work for you?
Cheers,
It certainly would. I've looked at default.py in the plugins folder but python is beyond me.
I'm dealing with the exact same setup. I'm gonna try writing something up and stick it here when I'm done.
Here ya go: https://gist.github.com/moomoohk/f3b114c392aae03f0cd2
The script copies everything in /.build
to /build
without deleting hidden files and folders (like .git and .gitignore). If you want to change the output folder change build_folder = site._path + "/build"
on line 14 to build_folder = site._path + "/[whatever]"
.
Enjoy!
I'm deploying my Cactus site to Github Pages. How do I handle this considering that Cactus seems to clear all the .git files and folders from the build folder on every build?