pretext-cli icon indicating copy to clipboard operation
pretext-cli copied to clipboard

Make two deploy methods cohesive

Open oscarlevin opened this issue 1 year ago • 5 comments

If you use pretext deploy, you deploy to the gh-pages branch. But if you use the github actions workflow, you need to have your pages setting set to actions. It would be nice to have both options available for a single project.

oscarlevin avatar May 08 '24 15:05 oscarlevin

See also https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#:~:text=All%20GitHub%20Pages%20builds%20will%20use%20GitHub%20Actions%20from%20June%2030%2C%202024.

StevenClontz avatar May 09 '24 18:05 StevenClontz

See also https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#:~:text=All%20GitHub%20Pages%20builds%20will%20use%20GitHub%20Actions%20from%20June%2030%2C%202024.

I think that warning is that you need github actions enabled for the repository, not that github actions needs to be the method for deploying pages. Elsewhere in the documentation it talks about how even if you use a different CI workflow to build the site, and say push it to a gh-pages branch, the final deployment will be done with an action. It's just not an action you need to set up.

So, I wonder if it makes sense to just run pretext deploy in our action. That way everything is always the same.

oscarlevin avatar Jun 14 '24 20:06 oscarlevin

I think https://github.com/braughtg/ex-link-pretext-bug/actions/runs/9487487141/job/26144337095#:~:text=consider%20exploring%20the%20%60enablement%60%20parameter%20for%20this%20action is a clue on how to enable GH Pages via Actions.

I'm hopeful next week we'll find a solution that allows for deployments (whether from local or from CI/CD) that don't muck up a gh-pages branch and bloat the repo.

StevenClontz avatar Jun 15 '24 19:06 StevenClontz

I'm also interested in adding support for Cloudflare Pages, where every push to a repository could be built and deployed to a preview URL, with merges to main going to the canonical URL. https://developers.cloudflare.com/pages/configuration/preview-deployments/

StevenClontz avatar Jun 15 '24 19:06 StevenClontz

I'm somewhat leaning towards wontfix here - keep pretext deploy as a legacy feature for the rest of 2.x, but encourage folks to use action deploys instead (or manually deploy), to increase likelihood of valid/buildable projects, and improve visibility/troubleshooting for when things don't work

If we do update this, I wonder if, rather than having an action create an artifact, we can have pretext deploy upload an artifact from the local machine, so we can reuse both the ghpages and cloudflare (and future) workflows to handle the rest.

StevenClontz avatar Jun 20 '24 03:06 StevenClontz