Closed pietroppeter closed 3 years ago
Wow thanks for sharing your experience with the beast that is the CI :D
Just to make it clear, is this the order of operations?
gh-pages
branchDoes this depend on #28 being merged first?
Yeah that is a good order. No they are independent
Alright! 👌 I'll fix and merge this tomorrow
Have performed the steps now but gh-pages
is empty 🤔
This was the correct setting, right?
Or is it this .gitignore
that is causing this? @Clonkk https://github.com/SciNim/getting-started/blob/29b3df41c33eaf683e202f0ce8646bd501f4cbd4/docs/.gitignore#L1
yes, settings are good. that gitignore does not look good...
Ok, should we add a manual rm docs/.gitignore
then?
I would remove it directly from main
I think the reason we added it to begin with was to prevent accidentally commiting local files in docs/
. Idk if it could cause any harm if we removed it directly or not.
Ah the github action you use do not add - f files.
Yes, the idea is to be able to build locally and avoid the mistakes of "git add .".
The git ignore can be removed as long as we're cautious : we can simply protect the main branch and require review before merging we're unlikely to miss a PR adding dozens of files (that's probably a better way of doing it).
I see that in nimibook root folder the gitignore contains docs
folder and the same actions runs fine. probably we can remove the gitognore in docs folder and add docs as an ignored folder in root gitgnore.
I see that in nimibook root folder the gitignore contains docs folder and the same actions runs fine. probably we can remove the gitognore in docs folder and add docs as an ignored folder in root gitgnore.
I'd prefer this if it works
The git ignore can be removed as long as we're cautious : we can simply protect the main branch and require review before merging we're unlikely to miss a PR adding dozens of files (that's probably a better way of doing it).
We should probably add protection as well, do you know how to do it? @Clonkk
Adding docs/
to the root .gitignore
solved it 🥳
I added the rule that require CI to pass and at least one person approving a PR to be merged
As experienced in nimibook (e.g. https://github.com/pietroppeter/nimibook/issues/30), current gh-actions for commiting and pushing new docs in gh-pages has problems when files are added and removed (since it is based on a rebase command). I tested https://github.com/peaceiris/actions-gh-pages in nimibook and it works well.
Changes needed on top of merging this: