Openscapes / kyber

💎 Elegant tools for a more civilized age.
https://openscapes.github.io/kyber/
Other
17 stars 4 forks source link

Fix website build and deploy #95

Closed ateucher closed 7 months ago

ateucher commented 7 months ago

Because previously there was no action to deploy the website, we all have out of date local copies of the docs/ folder. We should have the website only render via actions, probably on gh-pages branch, and remove the docs/ folder from main.

ateucher commented 7 months ago

@seankross I would like to remove the docs/ folder and deploy the site from gh-pages branch, using this action. This will make the rendered site only exist in the gh-pages branch and prevent the rendered docs/ folder from cluttering up our git history/cause merge conflicts. What do you think?

seankross commented 7 months ago

go for it!

stefaniebutland commented 7 months ago

@ateucher pls tag me when you've done this. Thanks

ateucher commented 7 months ago

@stefaniebutland @seankross @jules32 this is done! The rendered pkgdown site now only lives in the gh-pages branch, and the repo is configured to serve the site from there. It will build the site on PRs (but not deploy), and deploy when PRs are merged to main or you push directly to main. No more rendered docs/ in git (I deleted the folder and added it to .gitignore).

ateucher commented 7 months ago

If you have any local branches, please pull and merge main into them so you don't accidentally re-commit docs/

stefaniebutland commented 7 months ago

@ateucher I'm a novice at "please pull and merge main into" a branch. I want to merge this pull request: https://github.com/Openscapes/kyber/pull/71 that's on an old branch https://github.com/Openscapes/kyber/tree/cert-completion

Can you please give me an explicit line or to to do this? Or a ~15min screenshare zoom so I can drive?

ateucher commented 7 months ago

Yes, sorry to be obtuse!

If you want to stay in R land, the usethis PR Helpers are really nice. Using that at the R console, you would do:

library(usethis)

pr_fetch(71) # checks out the branch and pulls it down locally
pr_merge_main() # pulls main and merges it into your current branch
pr_push() # pushes your current branch/PR

Then you should be safe to merge the PR on GitHub, once all checks pass. Once the PR is merged, back in your R session, run:

pr_finish()

It will check to make sure the PR has been successfully merged, then switches you back to main locally, and deletes the local and remote cert-completion branches.

If you want to do it in the terminal, the steps would be:

  1. make sure you have all the updates to main locally:
git checkout main
git pull
  1. make sure you have all updates to cert-completion locally
git checkout cert-completion
git pull
  1. merge main into cert-completion and push to GitHub, updating the PR
git merge main
git push

Then you can merge the PR on GitHub once all the checks pass.

ateucher commented 7 months ago

I think we can close this now @stefaniebutland?

stefaniebutland commented 7 months ago

Thank you both so much!