I used a template and PkgTemplate. I finally got coverage testing and travis and all that working. When I make a change and push to the repo, all the tests run, the badges are updated, etc.
But I can’t get the documentation to show up on github. (You’ll notice that the docs badge is a broken link…)
In fact, the documentation is not being deployed to gh-pages branch on the package’s repo. When make.jl runs, the documentation is created—I can see it a build directory inside docs. But the contents don’t automatically get pushed to github. I can’t figure out why. I believe I followed all the directions given in the Documenter.jl docs (like adding keys, etc.), but I’m still stuck.
When I run julia make.jl in the docs. It looks like this:
➜ dev/MinkowskiReduction/docs git:(main) ✗ julia make.jl
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
┌ Warning: Documenter could not auto-detect the building environment Skipping deployment.
└ @ Documenter ~/.julia/packages/Documenter/bFHi4/src/deployconfig.jl:75
Not sure that Warning is relevant…but ‘skipping deployment’ sounds like my problem. Not sure why the building environment is not known. To me it’s obviously the docs/build folder…
Any ideas what I failed to do in my setup? Or what maybe I did wrong?
Is there some log file or something I should be looking at to debug this? Sorry for the newbie questions. I’m still figuring out all the package stuff.
If everything is working, should I see html files in my gh-pages branch on my github repo?
If I run julia make.jl on my local copy of the repo (rather than having travis-ci do it, or github actions) should it still work? Should it deploy my docs to github?
That will create a local copy of the page. You can see and edit it locally. I use a simple script that launches a python-based local server (http.server) for that:
# file: webserver.sh
previous=`ps aux | grep python3 |grep http.server| awk '{print $2}'`
if [[ $previous > "" ]];then
kill -9 $previous
fi
python3 -m http.server --bind localhost
If you run webserver.sh from the build directory created with make.jl you will be able to see your page at http://127.0.0.1:8000/.
But, answering your question, that does not publish your docs.
Finally, I can’t see anything wrong with your docs. Did you do, in github:
but my badges created by the PkgTemplate package point to dev and stable branches so those links are still broken…(I guess I’ll live without different branches of the docs for now).
But I’m really excited to have the documentation showing up finally. Thank you!
I can’t get the html pages to build on my project WaterLily.jl and I’m general confused about the gh-pages branch. Why is this needed and what should be different on this branch compared to master? Every time I make a change on master, will I have to merge that change into gh-pages in order to refresh the documents (once I actually get them working)?
The gh-pages banch should not contain the code contained in the main branch. It is started as an empty branch (either manually, or automatically when the documentation is deployed for the first time), and when the documentation is deployed, the built docs are stored there. For example:
Hey everyone! I first apologise to revive this topic but I’ve been following @Imiq guide Publish Docs · JuliaNotes.jl for the keys generation etc but still, my (manually created) gh-pages branch remains empty after the deployment action… Here is the package GitHub - AntoineRestivo/BosonSampling.jl: Boson sampling tools for Julia. I was wondering wether I need to put the value of the (public) key somewhere in the workflow files or not.
My understanding of that is only empirical, but creating an empty branch is different from creating a branch with nothing in it. I can only recommend deleting that branch and starting over, creating the empty branch from the GitHub site.
As far as I understand, yes, you need to remove the branch and create an empty one. But you don’t need to do anything else, the content will be created automatically by the CI script once you tag a new version. (this part: Publish Docs · JuliaNotes.jl)
I removed the gh-pages branch and followed the commands that you referred to. So, the new fresh gh-pages got created. Afterward, I published a new release, but the error remained as before.