https://www.dendron.so/ logo
Great news <@701837348341809264> ! How did you do ...
# questions
c
Great news @rlh1994 ! How did you do it? I haven't found documentation on this, and I'm not good at CI
r
I pretty much just copied the stuff from this repo into mine and tweaked to use the runners I had access to - I'm not sure how gitlab usually gives CI time so I can't really help there
I'm not sure how up to date that is but @ScriptAutomate might be able to help
c
thank you so much for pointing that out!
r
Other option is build the site locally and then it just needs to be moved into the
docs
folder at the top level of your repo
c
I was thinking of creating a git hook to deploy the site in every commit and then push it to another branch
I've never done it before, but it makes sense to me on a theoretical level
(probably, a git hook when pushing would be better)
r
We had the CI/CD set up to only trigger on pushes to main, so we'd only publish merged things
c
I've never created a git hook, but I'll give it a try
which hook did you use in that case? (triggered when pushing to main -seems to be the right approach)
r
We used rules on the cicd yaml so the pipeline only ran then https://docs.gitlab.com/ee/ci/jobs/job_control.html
c
thanks again
s
@kevins8 I've opened an MR here for updating the GitLab template to use the latest version of Dendron: https://gitlab.com/dendronhq/template.publish.gitlab/-/merge_requests/2 Looks like the template publishes via GitLab Pages as expected. Here is the GitLab Pages of my fork: https://scriptautomate.gitlab.io/template.publish.gitlab
@ccamara So using the template should work out well. I don't have a guide on this, yet, but I should definitely get a tutorial into the Dendron site wiki since it works well as a starting point
@rlh1994 Those are good points that it could, by default, be configured to just generate/publish to GitLab Pages when pushed to
main
. Though, if you are using a workflow with forks and branches that you are merging into
main
in the upstream, not specifying a branch can make it so that it is easy to preview what a GitLab Pages result of your fork currently looks like (can make MRs easier to review). That's usually the workflow I've been seeing with GitLab Pages work, but that's also because most projects I'm working on don't really have multiple branches in the upstream outside of
main
or
master
, just branches in the forks
r
@ScriptAutomate yeah it totally depends on usecase, the one I'm talking about was meant as "production" type documentation and had like 60 open MR at one point as we did a huge drive to get people to contribute, but my personal one would just run whatever branch I pushed to.
s
That makes a lot of sense, we use a similar workflow for publishing official documentation so that it's ready for a software release but isn't promoted until release day. That's cool to hear you got Dendron being used for docs like that at work! I'm using Sphinx mostly for tech docs and Dendron for internal knowledge base
r
@ScriptAutomate got it done just in time to leave! New place seems to be using notion so at least there's an export pod I could use
k
merged!
s
I noticed you may need to verify your account on GitLab, since the pipeline for the repo in the Dendronhq org won't execute from changes you've merged in, giving this error: > The pipeline failed due to the user not being verified
k
sigh, just updated
6 Views