Closed ateucher closed 1 year ago
That's a great idea. I've always struggled with the workflow required to remove something from a repo once you've added it, so walking through that would be helpful. (Is it as simple as deleting the folder, pushing that to main, then adding it to .gitignore before rendering locally again?)
Not quite that simple unfortunately (it never is with Git!). I think the workflow is:
Once all PRs are merged, ne person pulls main
and:
course-content/_book/
to .gitignore
git rm -r --cached course-content/_book
When everyone else pulls main
it will delete the _book
dir from their repo, which is ok because then we should be able to render/preview locally, which will recreate the _book
dir, but not track it in git anymore
Okay that's not so terrible, we can do that piece for sure. Is there anything we need to change to set up the GitHub Action to render to GitHub pages?
So maybe before creating new content let's try to get to a pretty clean state on main
by finishing up and merging the two open PRs... I think that's the easiest path now since we didn't set it up properly to start.
For the Actions piece, we should just be able to add the appropriate yaml
file from here: https://github.com/quarto-dev/quarto-actions
Okay great. Once our current PRs are done we will try to set that all up :)
Actually another possible route that would make the current PRs cleaner - do the above on main, then locally switch to each branch and git merge main
and then push. That will clean out the _book
dir on each PR
Okay I've updated main to have a modified gitignore and removed the _book folder from the repo. I've also updated all my local branch repos to be merged with main so that this change is propagated everywhere - I'm guessing both of you will need to do the same @ateucher @swayneh ?
Website is updated, _book is gone, and we are good to go! Going to close this off.
Nice work @lindsay-forestell!
@swayneh @lindsay-forestell should we set up a GitHub Actions workflow that renders the course site to GitHub pages whenever there is a push to
main
or aPR
is merged?If so, then after all open PRs are merged, I think it's sensible to remove the rendered materials from the repo, and add the
_book
folder to.gitignore
. Then you can render/preview locally but will only be pushing up changes to the source material, which will make version control much easier.