Refactoring deploy #521
Replies: 3 comments 2 replies
-
I'd suggest |
Beta Was this translation helpful? Give feedback.
-
I've been thinking about how we should "stage" a deployment that includes a "site" (landing page). Options:
I'm leaning toward 3. It has the advantage of not tempting users to mess with deploy files between building the site and deploying it. And for users who do not use the site directory, they never need to worry about the difference between site, output, and deploy-preview. |
Beta Was this translation helpful? Give feedback.
-
I had begun work at #556 while Oscar wrote the last post. We went with option 1, but by default it lives in |
Beta Was this translation helpful? Give feedback.
-
For version 2.0.0, I wonder if we should rethink how the deploy function works. Previously, you deployed just a target (and
pretext deploy
just assumed you meant the first target, usuallyweb
). Then we added the option to deploy multiple targets at once and also deploy the contents ofsite
, a folder in the root of your project that might contain a landing page.The current way we decide between these two options is by looking at
project.ptx
and seeing if any targets had adeploy-dir
element (legacy) orsite
attribute (v2). This seems sneaky to me.Further complicating things is that soon we will want
pretext deploy runestone
to do something different (for the target whose name isrunestone
). Perhaps we would want to deploy multiple single targets to different places? Probably best not to try to go down that path. I assume that we would never want to deploy a runestone target to github pages, right?Here is my proposal, that I would appreciate feedback on:
pretext deploy
has two possible arguments,gh-pages
(default) andrunestone
.gh-pages
deploy, we always deploy asite
directory, possibly creating it if it doesn't exist or isn't specified in the manifest.site
attribute, we assume the first html target. That gets copied to to root of thesite
folder. So this is really just the same behavior as now.site
attribute, we deploy them as requested (also possibly creating thesite
folder and a basic landing page. Eventually.runestone
deploy can come later, as we decide on workflow as discussed elsewhere (Make deploying to Runestone easy #513).Essentially, this is just changing what the argument means on the
deploy
command. I think it will also simplify the code since we don't need to do as much guessing.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions