Le ven. 6 août 2021 à 01:01, David Jencks <david.a.jen...@gmail.com> a écrit :
> I think I asked the wrong question. I’d like to understand: > - where the human-edited website source is, > -> https://github.com/apache/openwebbeans-site/tree/main/content > - where the generated source is and what it’s generated from and how > -> https://github.com/apache/openwebbeans-site/tree/asf-site/output > - the process by which this eventually gets to the asf-site branch of the > openwebbeans-site repo. > It is in owb-site for owb part, meecrowave used scm publish maven plugin so means today we "cp" it from meecrowave-doc/target/meecrowave-$version ( https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-doc/pom.xml#L191 ). This is the part I'd like to make working. > > > On Aug 5, 2021, at 1:26 PM, Romain Manni-Bucau <rmannibu...@gmail.com> > wrote: > > > > Le jeu. 5 août 2021 à 20:54, David Jencks <david.a.jen...@gmail.com> a > > écrit : > > > >> What process updates the content? > >> > > > > We have an asf.yaml but didnt see it used fast enough so pushed directly > in > > main branch the html files. > > > > > > > >> Personally I think it’s weird to have a site repo that combines html and > >> markdown with some process that builds the markdown to html. > >> > > > > We dont need the md to html part i think. > > > > > >> Would cloning at depth 1 alleviate your concerns? > >> > > > > Can i push after? Got trouble with that years ago. > > This Jenkinsfile script seems to be working great for Aries and Felix with > an Antora build: > > > stages { > stage('build') { > steps { > sh 'rm -rf build' > // clone the felix-site-pub repo > sh 'git clone --depth 1 --branch asf-staging > https://gitbox.apache.org/repos/asf/felix-site-pub.git build/site' > dir('build/site') { > sh 'git rm -r .' > } > > sh 'npm run clean-install' > sh 'npm run build-noclean' > > dir('build/site') { > sh 'git add .' > sh 'echo `git commit -m "site build"`' > sh 'git push > https://gitbox.apache.org/repos/asf/felix-site-pub.git asf-staging' > } > } > } > } > > What I like about this approach is that the website is built complete each > time from some kind of source and the initial ‘git rm -r’ makes sure there > is no leftover outdated content that is no longer being generated. > Hmm, do you know if maven-scm-publish-plugin supports depth handling? > > > > If publishing is done by CI what’s the problem with cloning the whole > repo? > >> > > > > Does not scale and blocks/slows down too much publishing after some time, > > must stay straight forward IMHO since we dont do it often and should be > > locally reproducable. > > I don’t understand. If you clone with depth 1 then you are only fetching > the last version of the site, which is likely to be approximately the same > size as the new version of the site. > Point is to not use any command outside maven (exec does not count ;)). > > AFAICT the only way to get a predictable result is to have a process to > build the entire website from sources, in which case there’s no need to > locally clone the site repo since only CI should be actually updating it. > This is the theory but never really works, you always need to build it locally at some point and this is why a lot of asf websites moved to some custom generated website in their own techno (java for us). > > I might be biased from my Antora experiences. > To have used antora I have to admit I invested in dropping it a lot lately and simplifying the generation since it becomes quite quickly slow and outdated compared to using a technology aligned on the project itself. That said the same experience proved you must be able to run it locally, at least to have preview without using the staged website which prevents concurrent work on some parts and tend to easily publish to 'prod' garbage too (same source in current setup). (indeed I'm not saying antora is wrong by itself but just not aligned on fully java based OSS projects in general + for us it is overkill since we have 2 *independent* website sources) > > David Jencks > > > > > > > > >> David Jencks > >> > >>> On Aug 5, 2021, at 6:31 AM, Romain Manni-Bucau <rmannibu...@gmail.com> > >> wrote: > >>> > >>> Hi all, > >>> > >>> AFAIK we migrated our site to > >> https://github.com/apache/openwebbeans-site > >>> > >>> It is ok until we want to publish the content. Until now we were > >> publishing > >>> it to subfolders directly (like meecrowave one) but now it is on git > i'm > >>> not sure how to setup the publish-scm or other plugin. > >>> What i'd like to avoid is to clone the full git repo to modify > meecrowave > >>> folder and then commit/push it. > >>> > >>> Any idea? > >>> > >>> Side note: worse case we can go back on svn if there is no clean > >> solution, > >>> it does not impact the dev process so the simplest is the best here > IMHO. > >>> > >>> Romain Manni-Bucau > >>> @rmannibucau <https://twitter.com/rmannibucau> | Blog > >>> <https://rmannibucau.metawerx.net/> | Old Blog > >>> <http://rmannibucau.wordpress.com> | Github < > >> https://github.com/rmannibucau> | > >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book > >>> < > >> > https://www.packtpub.com/application-development/java-ee-8-high-performance > >>> > >> > >> > >