Custom Domain Issue

49 views
Skip to first unread message

Ryan Maccombs

unread,
Aug 17, 2025, 12:08:11 PMAug 17
to PreTeXt support
Let me start by saying I'm a complete newbie. I stumbled my way through https://pretextbook.org/doc/guide/html/tutorial-first-document.html after seeing a short presentation at MathFest and now have a small PreTeXt project on GitHub. Now I am working on having it deploy to a custom domain using the guide via https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site. Supposedly, it should all be working (have the CNAME setup and GitHub tells me "DNS check successful"), but ever since I connected this other domain, I cannot get my project to successfully deploy (the gh-pages branch doesn't change any more). Has anyone experienced this or know how I can fix this? Is there another step I am missing?

TIA!

Charilaos Skiadas

unread,
Aug 17, 2025, 1:59:42 PMAug 17
to pretext...@googlegroups.com
Hi Ryan,

hopefully some folks more knowledgeable would pitch in, but for starters, as you didn’t mention the words “GitHub action”, I assume you have not looked at the Github actions tab. So to help us troubleshoot, go to your repository webpage in Github.com (not in the codespace), so it would be something like www.github.com/skiadas/…. , and you should see a series of tabs near the top, starting with Code, then possibly Issues, Security and some others, and one of them would be called Actions. Go to that.

Basically whenever you sync, there is a GitHub action that triggers and starts its workflow, to build the project and deploy it to the gh-pages branch, which becomes your publicly viewed coursework. I suspect that this action is now failing, and you should be able to see some of those errors in that page, and that might give us some hints on what is going wrong. You should likely have also been receiving email notifications of failed actions.

As I don’t use the automated action myself much, I’m hoping others more knowledgeable will pitch in, but this might at least get the process started.

Charilaos Skiadas
Department of Mathematics
Hanover College


On Aug 17, 2025, at 10:39 AM, Ryan Maccombs <macc...@gmail.com> wrote:

Let me start by saying I'm a complete newbie. I stumbled my way through https://pretextbook.org/doc/guide/html/tutorial-first-document.html after seeing a short presentation at MathFest and now have a small PreTeXt project on GitHub. Now I am working on having it deploy to a custom domain using the guide via https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site. Supposedly, it should all be working (have the CNAME setup and GitHub tells me "DNS check successful"), but ever since I connected this other domain, I cannot get my project to successfully deploy (the gh-pages branch doesn't change any more). Has anyone experienced this or know how I can fix this? Is there another step I am missing?

TIA!

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/779eba7e-60bc-43b7-8a7c-7757c511011dn%40googlegroups.com.

Oscar Levin

unread,
Aug 17, 2025, 2:22:18 PMAug 17
to pretext...@googlegroups.com
One thing you could try is to use the "build and deploy" action in GitHub actions.  Just make sure you have pushed (sync) all your changes from a codespace.

We have a drop-in zoom session tomorrow morning if you want some help.  See https://prose.runestone.academy/#upcoming-events

Oscar Levin

unread,
Aug 18, 2025, 10:06:23 PMAug 18
to PreTeXt support
If you upgrade to CLI version 2.28.2, you can now add a `cname` attribute to the `<project>` element in "project.ptx".  So for example, you could have

<project  ptx-version="2" cname="mybook.example.org">.

When you run `pretext deploy`, it will automatically make a CNAME file on your gh-pages branch with "mybook.example.org".  Obviously change that to whatever custom domain you set up in github.

Ryan Maccombs

unread,
Aug 22, 2025, 10:34:41 AMAug 22
to PreTeXt support
Hmm it doesnt appear to be working but I may be missaligned again in my builds. Can you remind me the commands on how we resolved the alignment issue last time?

Thanks for all your help!
--Ryan

Ryan Maccombs

unread,
Aug 22, 2025, 10:34:41 AMAug 22
to PreTeXt support
Hi Oscar, Thank you so much for your help. I think unfortunately before I deployed this solution I went back through the GitHub pages setting and readded my URL there. This seems to be a bad mistake (I suspect my branch is out of sync again). Can you help remind me the commands we used to realign my branch with a previous build? Or I can wait and join the open hours next week if that is more convenient for you. Thanks!

On Monday, August 18, 2025 at 10:06:23 PM UTC-4 oscar...@gmail.com wrote:

Oscar Levin

unread,
Aug 22, 2025, 11:54:21 AMAug 22
to pretext...@googlegroups.com
I have an easier solution, which I'm embarrassed to say I didn't think of last time.  

Go to the webpage for your repository.  Near the top left there is a link to see all your branches.  Click there and on the next page delete the gh-pages branch.  The pretext deploy command always completely rewrites this branch anyway, so there is no danger in losing the history of your changes (or no reason to keep such a history).

Then go back to your book and build and deploy with the newest CLI version (2.28.2).  That should just work.  The CNAME file should be added, so github should not need to create it again (but even if it does, it should be the same as the one pretext adds).

Ryan Maccombs

unread,
Aug 22, 2025, 12:26:41 PMAug 22
to PreTeXt support
Outstanding (it works)! Thanks for the help!
Reply all
Reply to author
Forward
0 new messages