Open oscarlevin opened 4 months ago
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.
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.
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/
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.
If you use
pretext deploy
, you deploy to thegh-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.