Quarto - Technical Documentation for the Technical

Here’s a fun filled question of ‘what if’. I use RH to host my personal domain/pages at flipphillips.com along with some academic related content where relevant. WordPress is way more than I need, but I use it.

I -also- host lots of my technical documentation + class syllabi, etc, out on GitHub Pages, Virtual Production: Syllabus – Virtual Production for example, Moiré – Virtual Production for another.

That stuff is all Quarto / markdown, comes from GitHub repos that contain code, etc, and are deployed via GitHub Actions automatically. Automation is my friend. I’m sort of tired of maintaining too many things. It’s tiring. I’m tired.

If you look at the Moire demo, the embedded iframe doesn’t work because GitHub Pages has it’s own CSP header that only lets through common iframe places. If I controlled my own site, like I suppose I do here, I could fix that :slight_smile: (Explore the Moire demo and learn about sampling artifacts in near real time!)

Quarto exists in a bunch of different forms (it’s the documentation backend for the R stats language if you’re curious) like a regular host binary, and the GitHub Actions builds a little container and runs it, the artifacts being the web pages.

I’m OK with the whole cPanel universe (mainly because someone is paying for this for me) we have here, but I’m not 100% clear on ways to utilize the hosting in ways that would allow me to serve the pages / sites from here, and am curious if anyone has done that.

I haven’t tried yet, but I’d guess there is a way for the GitHub artifacts (the site) to get deployed over here after rendering, which might be the ‘best possible’ solution, so I wouldn’t need to run a git/docker/qauarto instance here, even if that was a ‘thing’, I hate being my own sysop. So I’m wondering if there are ‘use cases’ out there in Reclaim Land.

I’m not very familiar with Quarto in particular, but if you can build the site using Github Actions and you want continue using that, you could build the site there and then have Github Actions deploy the site via SFTP to a particular folder in your cPanel account. I haven’t used this but in theory an action like this would work:

That should work, but honestly what I’d probably do is just create a quick “deploy” script that you run from your local machine when you want to update the public site. You get access to SSH, SFTP, and rsync as well as other nix tools on your cPanel account. Again I’m not familiar Quarto, but a deploy script could look like this in pseudo-code:

#!/usr/bin/env bash

# Build the site
quarto export # replace with whatever command actually builds your site!

# Push changes to github
git add .
git commit
git push

# Sync site to Reclaim Hosting account
rsync -ahP ./exported_site/ username@server.reclaimhosting.com:/home/username/public_html/

Or instead of rsyncing the files you could round trip the files through Github:

# Pull the the repo down from github
ssh username@server.reclaimhosting.com 'cd ~/repofolder && git pull'
# Copy the files to the right place
ssh username@server.reclaimhosting.com 'cp -r ~/repofolder/exported_site/ ~/public_html/'

Either route should work. I’m just less familiar with Github Actions so I wanted to throw an alternative out there.

1 Like

Great idea(s) and thanks for taking the time to respond. I’ll give it a try and post the solution out there if it works!

Actions have changed a bit here and there so you’re probably all the healthier for not being familiar :slight_smile: For about a month my site wasn’t rendering because of some changes, and students were getting confused when I said “hey - it’s on the web page, what do I have to look it up for you” - When I’d look it up for them, it’d be from the preview build on my laptop and not the GitHub.io page it turns out - let this be a lesson, etc etc etc.