antora_setup.html 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Converting the Wiki to Antora :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs/transition-docs/antora_setup.html">
  8. <meta name="generator" content="Antora 2.3.3">
  9. <link rel="stylesheet" href="../../_/css/site.css">
  10. </head>
  11. <body class="article">
  12. <header class="header">
  13. <nav class="navbar">
  14. <div class="navbar-brand">
  15. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">jMonkeyEngine Docs</a>
  16. <button class="navbar-burger" data-target="topbar-nav">
  17. <span></span>
  18. <span></span>
  19. <span></span>
  20. </button>
  21. </div>
  22. <div id="topbar-nav" class="navbar-menu">
  23. <div class="navbar-end">
  24. <a class="navbar-item" href="#">Home</a>
  25. <div class="navbar-item has-dropdown is-hoverable">
  26. <a class="navbar-link" href="#">Products</a>
  27. <div class="navbar-dropdown">
  28. <a class="navbar-item" href="#">Product A</a>
  29. <a class="navbar-item" href="#">Product B</a>
  30. <a class="navbar-item" href="#">Product C</a>
  31. </div>
  32. </div>
  33. <div class="navbar-item has-dropdown is-hoverable">
  34. <a class="navbar-link" href="#">Services</a>
  35. <div class="navbar-dropdown">
  36. <a class="navbar-item" href="#">Service A</a>
  37. <a class="navbar-item" href="#">Service B</a>
  38. <a class="navbar-item" href="#">Service C</a>
  39. </div>
  40. </div>
  41. <div class="navbar-item has-dropdown is-hoverable">
  42. <a class="navbar-link" href="#">Resources</a>
  43. <div class="navbar-dropdown">
  44. <a class="navbar-item" href="#">Resource A</a>
  45. <a class="navbar-item" href="#">Resource B</a>
  46. <a class="navbar-item" href="#">Resource C</a>
  47. </div>
  48. </div>
  49. <div class="navbar-item">
  50. <span class="control">
  51. <a class="button is-primary" href="#">Download</a>
  52. </span>
  53. </div>
  54. </div>
  55. </div>
  56. </nav>
  57. </header>
  58. <div class="body">
  59. <div class="nav-container" data-component="docs" data-version="master">
  60. <aside class="nav">
  61. <div class="panels">
  62. <div class="nav-panel-menu is-active" data-panel="menu">
  63. <nav class="nav-menu">
  64. <h3 class="title"><a href="../jme3.html">Docs</a></h3>
  65. <ul class="nav-list">
  66. <li class="nav-item" data-depth="0">
  67. <ul class="nav-list">
  68. <li class="nav-item" data-depth="1">
  69. <a class="nav-link" href="../documentation.html">Getting Started</a>
  70. </li>
  71. <li class="nav-item" data-depth="1">
  72. <a class="nav-link" href="https://javadoc.jmonkeyengine.org/v3.3.2-stable">JavaDoc</a>
  73. </li>
  74. <li class="nav-item" data-depth="1">
  75. <button class="nav-item-toggle"></button>
  76. <a class="nav-link" href="../jme3.html">jMonkeyEngine 3</a>
  77. <ul class="nav-list">
  78. <li class="nav-item" data-depth="2">
  79. <button class="nav-item-toggle"></button>
  80. <span class="nav-text">Beginner Tutorials</span>
  81. <ul class="nav-list">
  82. <li class="nav-item" data-depth="3">
  83. <a class="nav-link" href="../jme3/beginner/hello_simpleapplication.html">Hello SimpleApplication</a>
  84. </li>
  85. <li class="nav-item" data-depth="3">
  86. <a class="nav-link" href="../jme3/beginner/hello_node.html">Hello Node</a>
  87. </li>
  88. <li class="nav-item" data-depth="3">
  89. <a class="nav-link" href="../jme3/beginner/hello_asset.html">Hello Asset</a>
  90. </li>
  91. <li class="nav-item" data-depth="3">
  92. <a class="nav-link" href="../jme3/beginner/hello_main_event_loop.html">Hello Main Event Loop</a>
  93. </li>
  94. <li class="nav-item" data-depth="3">
  95. <a class="nav-link" href="../jme3/beginner/hello_input_system.html">Hello Input System</a>
  96. </li>
  97. <li class="nav-item" data-depth="3">
  98. <a class="nav-link" href="../jme3/beginner/hello_material.html">Hello Material</a>
  99. </li>
  100. <li class="nav-item" data-depth="3">
  101. <a class="nav-link" href="../jme3/beginner/hello_animation.html">Hello Animation</a>
  102. </li>
  103. <li class="nav-item" data-depth="3">
  104. <a class="nav-link" href="../jme3/beginner/hello_picking.html">Hello Picking</a>
  105. </li>
  106. <li class="nav-item" data-depth="3">
  107. <a class="nav-link" href="../jme3/beginner/hello_collision.html">Hello Collision</a>
  108. </li>
  109. <li class="nav-item" data-depth="3">
  110. <a class="nav-link" href="../jme3/beginner/hello_terrain.html">Hello Terrain</a>
  111. </li>
  112. <li class="nav-item" data-depth="3">
  113. <a class="nav-link" href="../jme3/beginner/hello_audio.html">Hello Audio</a>
  114. </li>
  115. <li class="nav-item" data-depth="3">
  116. <a class="nav-link" href="../jme3/beginner/hello_effects.html">Hello Effects</a>
  117. </li>
  118. <li class="nav-item" data-depth="3">
  119. <a class="nav-link" href="../jme3/beginner/hello_physics.html">Hello Physics</a>
  120. </li>
  121. </ul>
  122. </li>
  123. <li class="nav-item" data-depth="2">
  124. <button class="nav-item-toggle"></button>
  125. <span class="nav-text">Intermediate Tutorials</span>
  126. <ul class="nav-list">
  127. <li class="nav-item" data-depth="3">
  128. <button class="nav-item-toggle"></button>
  129. <span class="nav-text">Concepts</span>
  130. <ul class="nav-list">
  131. <li class="nav-item" data-depth="4">
  132. <a class="nav-link" href="../jme3/intermediate/best_practices.html">Best Practices</a>
  133. </li>
  134. <li class="nav-item" data-depth="4">
  135. <a class="nav-link" href="../jme3/intermediate/simpleapplication.html">Simple Application</a>
  136. </li>
  137. <li class="nav-item" data-depth="4">
  138. <a class="nav-link" href="../jme3/features.html">Features</a>
  139. </li>
  140. <li class="nav-item" data-depth="4">
  141. <a class="nav-link" href="../jme3/intermediate/optimization.html">Optimization</a>
  142. </li>
  143. <li class="nav-item" data-depth="4">
  144. <a class="nav-link" href="../jme3/faq.html">FAQ</a>
  145. </li>
  146. </ul>
  147. </li>
  148. <li class="nav-item" data-depth="3">
  149. <button class="nav-item-toggle"></button>
  150. <span class="nav-text">Math Concepts</span>
  151. <ul class="nav-list">
  152. <li class="nav-item" data-depth="4">
  153. <a class="nav-link" href="../jme3/math_for_dummies.html">Math For Dummies</a>
  154. </li>
  155. <li class="nav-item" data-depth="4">
  156. <a class="nav-link" href="../jme3/intermediate/math.html">Math</a>
  157. </li>
  158. <li class="nav-item" data-depth="4">
  159. <a class="nav-link" href="../jme3/math.html">More Math</a>
  160. </li>
  161. <li class="nav-item" data-depth="4">
  162. <a class="nav-link" href="../jme3/rotate.html">Rotate</a>
  163. </li>
  164. <li class="nav-item" data-depth="4">
  165. <a class="nav-link" href="../jme3/math_video_tutorials.html">Math Video Tutorials</a>
  166. </li>
  167. </ul>
  168. </li>
  169. <li class="nav-item" data-depth="3">
  170. <button class="nav-item-toggle"></button>
  171. <span class="nav-text">3D Graphics Concepts</span>
  172. <ul class="nav-list">
  173. <li class="nav-item" data-depth="4">
  174. <a class="nav-link" href="../jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>
  175. </li>
  176. <li class="nav-item" data-depth="4">
  177. <a class="nav-link" href="../jme3/scenegraph_for_dummies.html">Scenegraph for Dummies</a>
  178. </li>
  179. <li class="nav-item" data-depth="4">
  180. <a class="nav-link" href="../jme3/beginner/hellovector.html">Hello Vector</a>
  181. </li>
  182. <li class="nav-item" data-depth="4">
  183. <a class="nav-link" href="../jme3/terminology.html">Terminology</a>
  184. </li>
  185. <li class="nav-item" data-depth="4">
  186. <a class="nav-link" href="../jme3/intermediate/how_to_use_materials.html">How to Use Materials</a>
  187. </li>
  188. <li class="nav-item" data-depth="4">
  189. <a class="nav-link" href="../jme3/intermediate/transparency_sorting.html">Transparency and Sorting</a>
  190. </li>
  191. <li class="nav-item" data-depth="4">
  192. <a class="nav-link" href="../jme3/external/blender.html">Importing from Blender</a>
  193. </li>
  194. <li class="nav-item" data-depth="4">
  195. <a class="nav-link" href="../jme3/external/3dsmax.html">Importing from 3DS Max</a>
  196. </li>
  197. </ul>
  198. </li>
  199. </ul>
  200. </li>
  201. </ul>
  202. </li>
  203. <li class="nav-item" data-depth="1">
  204. <a class="nav-link" href="../logo.html">Logo Usage</a>
  205. </li>
  206. <li class="nav-item" data-depth="1">
  207. <a class="nav-link" href="../bsd_license.html">License</a>
  208. </li>
  209. <li class="nav-item" data-depth="1">
  210. <a class="nav-link" href="../github_tips.html">Github Tips</a>
  211. </li>
  212. </ul>
  213. </li>
  214. <li class="nav-item" data-depth="0">
  215. <button class="nav-item-toggle"></button>
  216. <span class="nav-text">SDK</span>
  217. <ul class="nav-list">
  218. <li class="nav-item" data-depth="1">
  219. <a class="nav-link" href="../sdk.html">jMonkeyEngine SDK</a>
  220. </li>
  221. </ul>
  222. </li>
  223. </ul>
  224. </nav>
  225. </div>
  226. <div class="nav-panel-explore" data-panel="explore">
  227. <div class="context">
  228. <span class="title">Docs</span>
  229. <span class="version">master</span>
  230. </div>
  231. <ul class="components">
  232. <li class="component is-current">
  233. <span class="title">Docs</span>
  234. <ul class="versions">
  235. <li class="version is-current is-latest">
  236. <a href="../jme3.html">master</a>
  237. </li>
  238. </ul>
  239. </li>
  240. <li class="component">
  241. <span class="title">Wiki UI</span>
  242. <ul class="versions">
  243. <li class="version is-latest">
  244. <a href="../../wiki-ui/index.html">master</a>
  245. </li>
  246. </ul>
  247. </li>
  248. </ul>
  249. </div>
  250. </div>
  251. </aside>
  252. </div>
  253. <main class="article">
  254. <div class="toolbar" role="navigation">
  255. <button class="nav-toggle"></button>
  256. <a href="../documentation.html" class="home-link"></a>
  257. <nav class="breadcrumbs" aria-label="breadcrumbs">
  258. <ul>
  259. <li><a href="../jme3.html">Docs</a></li>
  260. <li><a href="antora_setup.html">Converting the Wiki to Antora</a></li>
  261. </ul>
  262. </nav>
  263. <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/docs/modules/transition-docs/pages/antora_setup.adoc">Edit this Page</a></div>
  264. </div>
  265. <div class="content">
  266. <article class="doc">
  267. <h1 class="page">Converting the Wiki to Antora</h1>
  268. <div class="sect1">
  269. <h2 id="getting-started"><a class="anchor" href="#getting-started"></a>Getting Started</h2>
  270. <div class="sectionbody">
  271. <div class="paragraph">
  272. <p>Setup is based off <a href="https://help.github.com/en/actions/language-and-framework-guides/using-nodejs-with-github-actions">Using Node.js with GitHub Actions</a>, <a href="https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows">Caching dependencies to speed up workflows</a>, and the <a href="https://docs.antora.org/antora/2.3/install/install-antora/">Install Antora</a> guides. It is expected that the repository has already been cloned locally.</p>
  273. </div>
  274. <div class="olist arabic">
  275. <div class="title">Definitions</div>
  276. <ol class="arabic">
  277. <li>
  278. <p>GitHub Web Interface (GWI)</p>
  279. </li>
  280. <li>
  281. <p>Git Command Line Interface (CLI)</p>
  282. </li>
  283. <li>
  284. <p>Continuous Integration (CI)</p>
  285. </li>
  286. </ol>
  287. </div>
  288. <div class="olist arabic">
  289. <div class="title">Tools needed</div>
  290. <ol class="arabic">
  291. <li>
  292. <p>A gitHub account.</p>
  293. </li>
  294. <li>
  295. <p>The Atom Editor, setup for using AsciiDoctor.</p>
  296. </li>
  297. <li>
  298. <p>Git (CLI).</p>
  299. </li>
  300. </ol>
  301. </div>
  302. </div>
  303. </div>
  304. <div class="sect1">
  305. <h2 id="activating-dispatch-event"><a class="anchor" href="#activating-dispatch-event"></a>Activating Dispatch Event</h2>
  306. <div class="sectionbody">
  307. <div class="paragraph">
  308. <p>We use a dispatch_event to build the wiki anytime there are new changes tagged on the wiki-ui repository.</p>
  309. </div>
  310. <div class="paragraph">
  311. <p>To activate the <code>Docs Dispatch Event</code> command, it must share a personal access token, with permissions <code>public_repo</code>, with the jMonkeyEngine Wiki.</p>
  312. </div>
  313. <div class="paragraph">
  314. <p>You setup the token first from your personal account with the token name <code>WIKI_UI_DISPATCH</code>.</p>
  315. </div>
  316. <div class="paragraph">
  317. <p>See: <a href="https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line" class="bare">https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line</a></p>
  318. </div>
  319. <div class="paragraph">
  320. <p>Then in the wiki-ui repository under <span class="menuseq"><b class="menu">Settings</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Secrets</b></span> add the new token with the format:</p>
  321. </div>
  322. <div class="listingblock">
  323. <div class="content">
  324. <pre class="highlightjs highlight"><code>username:token</code></pre>
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. <div class="sect1">
  330. <h2 id="setup-of-node-js"><a class="anchor" href="#setup-of-node-js"></a>Setup of Node.js</h2>
  331. <div class="sectionbody">
  332. <div class="paragraph">
  333. <p>GitHub Actions requires a workflow file (main.yml) to be located in a <code>.github/workflows</code> folder. In order to use (CI) with the workflow, there must be a <code>package.json</code> and <code>package-lock.json</code> file located in the root of the repository. Node.js will build and update these files for us.</p>
  334. </div>
  335. <div class="ulist">
  336. <ul>
  337. <li>
  338. <p>We use an action named &#8220;EndBug/add-and-commit@v4&#8221; to commit the <code>package.json</code> and <code>package-lock.json</code> files to the repository any time there are changes that affect these files.</p>
  339. </li>
  340. <li>
  341. <p>We use an action named &#8220;peaceiris/actions-gh-pages@v3&#8221; to publish the built website to the <code>gh-pages</code> branch whenever there is a push to the repo.</p>
  342. </li>
  343. <li>
  344. <p>We use a <code>repository_dispatch</code> webhook event configured to recieve events from the wiki-ui repo to build the docs whenever there is a new release pushed to the UI repository.</p>
  345. </li>
  346. </ul>
  347. </div>
  348. <div class="paragraph">
  349. <p>These steps are all built into the workflow file.</p>
  350. </div>
  351. <div class="admonitionblock note">
  352. <table>
  353. <tr>
  354. <td class="icon">
  355. <i class="fa icon-note" title="Note"></i>
  356. </td>
  357. <td class="content">
  358. <div class="paragraph">
  359. <p>You can edit/add the main.yml from a git (CLI) or the (GWI) only.</p>
  360. </div>
  361. <div class="paragraph">
  362. <p>This tutorial uses (CLI) for workflow file edits, and the Atom Editor for editing all other files. Since both the (CLI) and Atom Editor are working with the same repository, both will stay synchronized with the local repository.</p>
  363. </div>
  364. </td>
  365. </tr>
  366. </table>
  367. </div>
  368. </div>
  369. </div>
  370. <div class="sect1">
  371. <h2 id="prepare-repository"><a class="anchor" href="#prepare-repository"></a>Prepare Repository</h2>
  372. <div class="sectionbody">
  373. <div class="olist arabic">
  374. <ol class="arabic">
  375. <li>
  376. <p>From the (CLI):</p>
  377. <div class="olist loweralpha">
  378. <ol class="loweralpha" type="a">
  379. <li>
  380. <p>Checkout a new branch named <code>antora-setup</code>.</p>
  381. </li>
  382. <li>
  383. <p>Create the destination folder <code>docs/modules/ROOT</code> in the root of the local repository.</p>
  384. </li>
  385. <li>
  386. <p>Move the folders found inside the Wiki <code>src/docs/</code> folder to the destination folder.</p>
  387. <div class="openblock">
  388. <div class="content">
  389. <div class="paragraph">
  390. <p>This will be the destination final results.</p>
  391. </div>
  392. <div class="listingblock">
  393. <div class="content">
  394. <pre class="highlightjs highlight"><code>|-docs
  395. |-modules
  396. |-ROOT
  397. |-images
  398. |-pages
  399. |-resources</code></pre>
  400. </div>
  401. </div>
  402. <div class="admonitionblock important">
  403. <table>
  404. <tr>
  405. <td class="icon">
  406. <i class="fa icon-important" title="Important"></i>
  407. </td>
  408. <td class="content">
  409. <div class="paragraph">
  410. <p>Use <code>git mv</code> from the (CLI) to retain all history.</p>
  411. </div>
  412. <div class="paragraph">
  413. <p>git mv [-v] [-n] &lt;source&gt; &lt;destination&gt;</p>
  414. </div>
  415. <div class="paragraph">
  416. <p>* [-n] option will do nothing; only show what would happen. Remove when ready to complete the move.</p>
  417. </div>
  418. </td>
  419. </tr>
  420. </table>
  421. </div>
  422. <table class="tableblock frame-all grid-all stretch">
  423. <colgroup>
  424. <col style="width: 50%;">
  425. <col style="width: 50%;">
  426. </colgroup>
  427. <tbody>
  428. <tr>
  429. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  430. <p>&lt;source&gt;</p>
  431. </div></div></td>
  432. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  433. <p>&lt;destination&gt;</p>
  434. </div></div></td>
  435. </tr>
  436. <tr>
  437. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  438. <p><code>src/docs/images</code></p>
  439. </div></div></td>
  440. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  441. <p><code>docs/modules/ROOT/images</code></p>
  442. </div></div></td>
  443. </tr>
  444. <tr>
  445. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  446. <p><code>src/docs/resources</code></p>
  447. </div></div></td>
  448. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  449. <p><code>docs/modules/ROOT/resources</code></p>
  450. </div></div></td>
  451. </tr>
  452. <tr>
  453. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  454. <p><code>src/docs/asciidocs</code></p>
  455. </div></div></td>
  456. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  457. <p><code>docs/modules/ROOT/pages</code></p>
  458. </div></div></td>
  459. </tr>
  460. </tbody>
  461. </table>
  462. <div class="admonitionblock important">
  463. <table>
  464. <tr>
  465. <td class="icon">
  466. <i class="fa icon-important" title="Important"></i>
  467. </td>
  468. <td class="content">
  469. The move to the <code>docs/modules/ROOT/pages</code> folder is a rename of the <code>asciidoc</code> folder. Do not move the folder into pages.
  470. </td>
  471. </tr>
  472. </table>
  473. </div>
  474. </div>
  475. </div>
  476. </li>
  477. <li>
  478. <p>Add, commit and push the <code>antora-setup</code> branch to the repository.</p>
  479. </li>
  480. </ol>
  481. </div>
  482. </li>
  483. </ol>
  484. </div>
  485. </div>
  486. </div>
  487. <div class="sect1">
  488. <h2 id="setup-workflow"><a class="anchor" href="#setup-workflow"></a>Setup Workflow</h2>
  489. <div class="sectionbody">
  490. <div class="paragraph">
  491. <p>All files for setup can be found inside the <code>transition-docs</code> module where this document is located. These are the final configuration files using the <code>master</code> branch to trigger builds and assume all steps have been completed and Antora is now in control of the build process for the wiki.</p>
  492. </div>
  493. <div class="paragraph">
  494. <p>Using the workflow shown below will execute on the <code>antora-setup</code> branch pushing the build to the <code>gh-pages</code> branch allowing setup to be completed. This will allow for testing the build prior to merging the branch to <code>master</code>.</p>
  495. </div>
  496. <div class="paragraph">
  497. <p>The changes that affect the workflow branch are as follows:</p>
  498. </div>
  499. <div class="listingblock">
  500. <div class="content">
  501. <pre class="highlightjs highlight"><code>on:
  502. push:
  503. branches: [ antora-setup ]
  504. uses: actions/checkout@v2
  505. with:
  506. ref: antora-setup</code></pre>
  507. </div>
  508. </div>
  509. <div class="admonitionblock tip">
  510. <table>
  511. <tr>
  512. <td class="icon">
  513. <i class="fa icon-tip" title="Tip"></i>
  514. </td>
  515. <td class="content">
  516. It&#8217;s a good idea to have the (GWI) actions tab open in a browser so the build can be monitored.
  517. </td>
  518. </tr>
  519. </table>
  520. </div>
  521. <div class="paragraph">
  522. <p>The action <code>EndBug/add-and-commit@v4</code> will commit to the branch that triggered the workflow.</p>
  523. </div>
  524. <div class="olist arabic">
  525. <ol class="arabic">
  526. <li>
  527. <p>From the (CLI):</p>
  528. <div class="olist loweralpha">
  529. <ol class="loweralpha" type="a">
  530. <li>
  531. <p>Create a <code>.github/workflows</code> folder in the <code>antora-setup</code> branch.</p>
  532. </li>
  533. <li>
  534. <p>Add the initial &#8220;main.yml&#8221; file below as a new workflow.</p>
  535. <div class="openblock">
  536. <div class="content">
  537. <div class="admonitionblock note">
  538. <table>
  539. <tr>
  540. <td class="icon">
  541. <i class="fa icon-note" title="Note"></i>
  542. </td>
  543. <td class="content">
  544. The initial file is designed to be used in steps, commenting and uncommenting commands as the changeover progresses. The finalized <a href="_attachments/main.yml">main.yml</a> is in the <code>transition-docs</code> module.
  545. </td>
  546. </tr>
  547. </table>
  548. </div>
  549. <div class="listingblock">
  550. <div class="title">Initial main.yml</div>
  551. <div class="content">
  552. <pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml"># This file can be used to configure the Node.js build for Antora ci without
  553. # having Node installed locally. See 'transition-docs/antora_setup.adoc' in the root
  554. # of this repo for details of how to use this file.
  555. #
  556. # The action add-and-commit will always commit the package-lock.json,
  557. # package.json and Antora cache only if changes are made to the files.
  558. #
  559. # If the package-lock.json or package.json files are updated or new depends are
  560. # installed, the 'npm ci' should be always ran thereafter to speed up build
  561. # times. When ci is active, the package-lock.json and package.json files in root
  562. # will not be updated.
  563. #
  564. # Uses the action actions-gh-page to publish pages to the gh-pages branch,
  565. # including a required .nojekyll file that Antora requires for configuration.
  566. #
  567. # The 'actions/cache@v2' creates a new cache when the packages in
  568. # package-lock.json file change, or when the workflow runner's operating system
  569. # changes.
  570. name: Build Docs
  571. on:
  572. push:
  573. branches: [ antora-setup ]
  574. # Initiate a build to pull in the wiki-ui repository changes.
  575. repository_dispatch:
  576. types: [wiki-ui-build]
  577. pull_request:
  578. jobs:
  579. build:
  580. #Static version is used to maintain stability.
  581. runs-on: ubuntu-18.04
  582. strategy:
  583. matrix:
  584. #Static version is used to maintain stability.
  585. node-version: [12.17.0]
  586. steps:
  587. - name: Clone the repo
  588. uses: actions/checkout@v2
  589. with:
  590. ref: antora-setup
  591. # Number of commits to fetch. 0 indicates all history.
  592. fetch-depth: 1
  593. - name: Use Node.js ${{ matrix.node-version }}
  594. uses: actions/setup-node@v1
  595. with:
  596. node-version: ${{ matrix.node-version }}
  597. # Display the sha of the build triggering the repository_dispatch event.
  598. - name: wiki-ui-build
  599. if: github.event.action == 'wiki-ui-build'
  600. run: echo wiki-ui-build sha ${{ github.event.client_payload.sha }}
  601. # Uncomment to write the default package.json file to the repo root.
  602. # When used in conjunction with the action add-and-commit 'add' command, the
  603. # file will be written to the repo for editing.
  604. - name: Install default package.json
  605. run: npm init --yes
  606. # Uncomment when adding or updating dependencies in the package-lock.json
  607. # and package.json files for ci.
  608. - name: Install Node
  609. run: npm i
  610. # Uncomment during initial setup or when updating Antora to a new version.
  611. # The action add-and-commit 'add' command will detect the changes and commit
  612. # the package-lock.json and package.json files.
  613. # Emoji support. Seems to be a direct implementation of AsciiDoctor ruby
  614. # extension.
  615. # see: https://github.com/mogztter/asciidoctor-emoji
  616. - name: Install Antora
  617. run: |
  618. npm i @antora/[email protected]
  619. npm i @antora/[email protected]
  620. npm i asciidoctor-emoji
  621. # Uncomment after package-lock.json and package.json files are updated.
  622. # - name: Run with CI
  623. # run: npm ci
  624. - name: Audit Depends
  625. run: npm audit
  626. # - name: Build Docs
  627. # run: npm run buildDocs
  628. # Detects any updates to package-lock.json and package.json and commits the
  629. # files to root.
  630. # see:
  631. # https://github.com/marketplace/actions/add-commit?version=v4.1.0
  632. # for use options.
  633. - name: Commit Packages
  634. uses: EndBug/add-and-commit@v4
  635. with:
  636. author_name: mitm001
  637. author_email: [email protected]
  638. message: "Commit files for CI workflow"
  639. # Commits these files to root if and only if there are changes.
  640. add: "package-lock.json package.json"
  641. env:
  642. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  643. # Commit changes to the gh-pages branch. Antora requires an empty
  644. # '.nojekyll' be present in the branch due to certain directories starting
  645. # with an underscore. This action has an option, set by default, to add that
  646. # file for us on commit.
  647. # see:
  648. # https://github.com/marketplace/actions/github-pages-action?version=v3.6.1
  649. # for use options.
  650. # - name: Deploy Docs
  651. # uses: peaceiris/actions-gh-pages@v3
  652. # with:
  653. # github_token: ${{ secrets.GITHUB_TOKEN }}
  654. # Commits these files to gh-pages if and only if there are changes.
  655. # publish_dir: ./build/site
  656. # Insert CNAME for repository.
  657. # cname: wiki.jmonkeyengine.org</code></pre>
  658. </div>
  659. </div>
  660. <div class="paragraph">
  661. <p>The initial main points of interest are as follows.</p>
  662. </div>
  663. <div class="listingblock">
  664. <div class="content">
  665. <pre class="highlightjs highlight"><code>repository_dispatch:
  666. types: [wiki-ui-build]</code></pre>
  667. </div>
  668. </div>
  669. <div class="paragraph">
  670. <p>When the webhook event <code>repository_dispatch</code> is triggered, with a secret <code>WIKI_UI_DISPATCH</code> token that matches the same secret token of this repository and with the <code>event_type</code> &#8220;wiki-ui-build&#8221;, the workflow build will run.</p>
  671. </div>
  672. <div class="paragraph">
  673. <p>See:</p>
  674. </div>
  675. <div class="ulist">
  676. <ul>
  677. <li>
  678. <p><a href="https://developer.github.com/v3/repos/#create-a-repository-dispatch-event" class="bare">https://developer.github.com/v3/repos/#create-a-repository-dispatch-event</a></p>
  679. </li>
  680. <li>
  681. <p><a href="https://blog.marcnuri.com/triggering-github-actions-across-different-repositories/" class="bare">https://blog.marcnuri.com/triggering-github-actions-across-different-repositories/</a></p>
  682. </li>
  683. <li>
  684. <p><a href="https://help.github.com/en/actions/reference/events-that-trigger-workflows#external-events-repository_dispatch" class="bare">https://help.github.com/en/actions/reference/events-that-trigger-workflows#external-events-repository_dispatch</a></p>
  685. </li>
  686. </ul>
  687. </div>
  688. <div class="listingblock">
  689. <div class="content">
  690. <pre class="highlightjs highlight"><code>#Static version is used to maintain stability.
  691. runs-on: ubuntu-18.04
  692. strategy:
  693. matrix:
  694. #Static version is used to maintain stability.
  695. node-version: [12.17.0]</code></pre>
  696. </div>
  697. </div>
  698. <div class="paragraph">
  699. <p>With the above lines, we are using a static version of <code>Unbuntu</code> and <code>Node.js</code>. Updates can potentially break things, and we would find out after the fact rather than knowing immediately that there was a problem.</p>
  700. </div>
  701. <div class="admonitionblock tip">
  702. <table>
  703. <tr>
  704. <td class="icon">
  705. <i class="fa icon-tip" title="Tip"></i>
  706. </td>
  707. <td class="content">
  708. <div class="paragraph">
  709. <p>Setting the node version using the matrix strategy has the added benefit of appending the Node.js version to our job <code>build</code> on the (GWI) dashboard.</p>
  710. </div>
  711. <div class="paragraph">
  712. <p>For example, our job name <code>build</code>, will have the version <code>12.17.0</code> appended like so:</p>
  713. </div>
  714. <div class="imageblock">
  715. <div class="content">
  716. <img src="_images/vers_append.png" alt="vers_append.png">
  717. </div>
  718. </div>
  719. </td>
  720. </tr>
  721. </table>
  722. </div>
  723. <div class="listingblock">
  724. <div class="content">
  725. <pre class="highlightjs highlight"><code>- name: Install default package.json
  726. run: npm init --yes</code></pre>
  727. </div>
  728. </div>
  729. <div class="paragraph">
  730. <p>The above line will create our default <code>package.json</code> file that will control the (CI) and hold any command line scripts we implement. Once this file is commited to the repo, this line is no longer used.</p>
  731. </div>
  732. <div class="listingblock">
  733. <div class="content">
  734. <pre class="highlightjs highlight"><code>- name: Install Node
  735. run: npm i</code></pre>
  736. </div>
  737. </div>
  738. <div class="paragraph">
  739. <p>This will install node into our workflow and create our initial <code>package-lock.json</code> file. Once the <code>package-lock.json</code> file is committed, this line will only be used to when adding new packages by appending the package name to the command. Change it to <code>run: npm update</code> to update depends.</p>
  740. </div>
  741. <div class="listingblock">
  742. <div class="content">
  743. <pre class="highlightjs highlight"><code>- name: Install Antora
  744. run: |
  745. npm i @antora/[email protected]
  746. npm i @antora/[email protected]
  747. npm i asciidoctor-emoji</code></pre>
  748. </div>
  749. </div>
  750. <div class="paragraph">
  751. <p>The above command will install our Antora depends.</p>
  752. </div>
  753. <div class="listingblock">
  754. <div class="content">
  755. <pre class="highlightjs highlight"><code>with:
  756. author_name: mitm001
  757. author_email: [email protected]
  758. message: "Commit files for CI workflow"</code></pre>
  759. </div>
  760. </div>
  761. <div class="paragraph">
  762. <p>The above is the author and message of the commit action. If the author name and email are not set, a warning will be thrown if <code>repository_dispatch</code> triggers a workflow. Customize as needed.</p>
  763. </div>
  764. <div class="listingblock">
  765. <div class="content">
  766. <pre class="highlightjs highlight"><code># Commits these files to root if and only if there are changes.
  767. add: "package-lock.json package.json*"</code></pre>
  768. </div>
  769. </div>
  770. <div class="paragraph">
  771. <p>This line will commit the <code>package-lock.json</code> and <code>package.json</code> if there are any changes to the files.</p>
  772. </div>
  773. <div class="listingblock">
  774. <div class="content">
  775. <pre class="highlightjs highlight"><code>env:
  776. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}</code></pre>
  777. </div>
  778. </div>
  779. <div class="paragraph">
  780. <p>The <code>secrets.GITHUB_TOKEN</code> doesn&#8217;t have authorization to create any successive events, so we avoid an infinite loop of commit, run workflows, commit, run workflows.</p>
  781. </div>
  782. </div>
  783. </div>
  784. </li>
  785. <li>
  786. <p>Add, commit and push the <code>antora-setup</code> branch to the repo. The workflow will commit the <code>package.json</code> and <code>package-lock.json</code> files into the root of the <code>antora-setup</code> branch of the repo.</p>
  787. </li>
  788. </ol>
  789. </div>
  790. </li>
  791. <li>
  792. <p>Issue a pull request. This will pull in the <code>.json</code> files.</p>
  793. </li>
  794. <li>
  795. <p>Edit the <code>main.yml</code> file by commenting out the &#8220;Install default package.json&#8221;, &#8220;Install Node&#8221; and &#8220;Install Antora&#8221; commands.</p>
  796. <div class="listingblock">
  797. <div class="content">
  798. <pre class="highlightjs highlight"><code># - name: Install default package.json
  799. # run: npm init --yes
  800. # - name: Install Node
  801. # run: npm i
  802. # - name: Install Antora
  803. # run: |
  804. # npm i @antora/[email protected]
  805. # npm i @antora/[email protected]
  806. # npm i asciidoctor-emoji</code></pre>
  807. </div>
  808. </div>
  809. <div class="olist loweralpha">
  810. <ol class="loweralpha" type="a">
  811. <li>
  812. <p>Add, commit and push the <code>antora-setup</code> branch to the repo.</p>
  813. </li>
  814. </ol>
  815. </div>
  816. </li>
  817. <li>
  818. <p>In the Atom Editor:</p>
  819. <div class="olist loweralpha">
  820. <ol class="loweralpha" type="a">
  821. <li>
  822. <p>Edit the <code>package.json</code> file.</p>
  823. <div class="openblock">
  824. <div class="content">
  825. <div class="listingblock">
  826. <div class="title">package.json</div>
  827. <div class="content">
  828. <pre class="highlightjs highlight"><code class="language-.json hljs" data-lang=".json">{
  829. "version": "1.0.1",
  830. "description": "jMonkeyEngine Documentation",
  831. "scripts": {
  832. "buildDocs": "$(npm bin)/antora --stacktrace wiki-playbook.yml"
  833. },
  834. "private": true,
  835. "license": "BSD-3-Clause",
  836. }</code></pre>
  837. </div>
  838. </div>
  839. <div class="admonitionblock note">
  840. <table>
  841. <tr>
  842. <td class="icon">
  843. <i class="fa icon-note" title="Note"></i>
  844. </td>
  845. <td class="content">
  846. See: <a href="https://nodejs.dev/learn/the-package-json-guide">The Package Json Guide</a>, and <a href="https://nodejs.dev/learn/the-package-lock-json-file">The package-lock.json file</a> for info on the properties that can be set and their meaning.
  847. </td>
  848. </tr>
  849. </table>
  850. </div>
  851. </div>
  852. </div>
  853. <div class="ulist checklist">
  854. <ul class="checklist">
  855. <li>
  856. <p><i class="fa fa-check-square-o"></i> Bump <code>"version": "1.0.1"</code>.</p>
  857. </li>
  858. <li>
  859. <p><i class="fa fa-check-square-o"></i> Fix the description.</p>
  860. </li>
  861. <li>
  862. <p><i class="fa fa-check-square-o"></i> Remove <code>test</code> from the scripts property.</p>
  863. </li>
  864. <li>
  865. <p><i class="fa fa-check-square-o"></i> Add the <code>buildDocs</code> script.</p>
  866. </li>
  867. <li>
  868. <p><i class="fa fa-check-square-o"></i> Add the <code>"private": true,</code> property.</p>
  869. </li>
  870. <li>
  871. <p><i class="fa fa-check-square-o"></i> Change the license.</p>
  872. </li>
  873. </ul>
  874. </div>
  875. </li>
  876. <li>
  877. <p>Edit the <code>package-lock.json</code> file:</p>
  878. <div class="ulist checklist">
  879. <ul class="checklist">
  880. <li>
  881. <p><i class="fa fa-check-square-o"></i> Bump <code>"version": "1.0.1"</code>.</p>
  882. </li>
  883. </ul>
  884. </div>
  885. </li>
  886. <li>
  887. <p>Stage, commit and push the <code>package.json</code> and <code>package-lock.json</code> files to the repo.</p>
  888. </li>
  889. </ol>
  890. </div>
  891. </li>
  892. </ol>
  893. </div>
  894. </div>
  895. </div>
  896. <div class="sect1">
  897. <h2 id="preparing-test-site"><a class="anchor" href="#preparing-test-site"></a>Preparing Test Site</h2>
  898. <div class="sectionbody">
  899. <div class="paragraph">
  900. <p>We only need this step for a repository imported from the wiki, skip otherwise.</p>
  901. </div>
  902. <div class="olist arabic">
  903. <ol class="arabic">
  904. <li>
  905. <p>From the (GWI).</p>
  906. <div class="olist loweralpha">
  907. <ol class="loweralpha" type="a">
  908. <li>
  909. <p>Switch to the <code>gh-pages</code> branch and delete the <code>CNAME</code> file.</p>
  910. </li>
  911. <li>
  912. <p>Commit the changes.</p>
  913. </li>
  914. <li>
  915. <p>In the <code>Settings</code> tab, set the newly created branch as the &#8220;Source&#8221; under the GitHub Pages settings. The link box for the site will change color to green, indicating it is configured.</p>
  916. <div class="paragraph">
  917. <p>This will be the branch we deploy the site to using the &#8220;Deploy Docs&#8221; command in the <code>main.yml</code> file.</p>
  918. </div>
  919. </li>
  920. </ol>
  921. </div>
  922. </li>
  923. </ol>
  924. </div>
  925. </div>
  926. </div>
  927. <div class="sect1">
  928. <h2 id="setup-antora"><a class="anchor" href="#setup-antora"></a>Setup Antora</h2>
  929. <div class="sectionbody">
  930. <div class="paragraph">
  931. <p>Add the configuration files. Once complete, our final source structure will look like so.</p>
  932. </div>
  933. <div class="listingblock">
  934. <div class="content">
  935. <pre class="highlightjs highlight"><code>|-docs
  936. | |-modules
  937. | | |-ROOT
  938. | | |-nav.adoc
  939. | | |-images
  940. | | |-pages
  941. | | |-resources
  942. | |-antora.yml
  943. |-wiki-playbook.yml</code></pre>
  944. </div>
  945. </div>
  946. <div class="olist arabic">
  947. <ol class="arabic">
  948. <li>
  949. <p>From the Atom Editor:</p>
  950. <div class="olist loweralpha">
  951. <ol class="loweralpha" type="a">
  952. <li>
  953. <p>Add the initial <code>wiki-playbook.yml</code> file to the root of the repo.</p>
  954. <div class="openblock">
  955. <div class="content">
  956. <div class="listingblock">
  957. <div class="title">Initial wiki-playbook.yml</div>
  958. <div class="content">
  959. <pre class="highlightjs highlight"><code>site:
  960. title: jMonkeyEngine Docs
  961. url: https://wiki.jmonkeyengine.org
  962. robots: disallow
  963. start_page: docs::documentation.adoc
  964. content:
  965. sources:
  966. - url: .
  967. branches: [antora-setup]
  968. start_path: docs
  969. - url: https://github.com/jMonkeyEngine/wiki-ui
  970. branches: HEAD
  971. start_path: docs
  972. ui:
  973. bundle:
  974. url: https://github.com/jMonkeyEngine/wiki-ui/releases/latest/download/ui-bundle.zip
  975. # Required when using cache or fetch will not update ui.
  976. snapshot: true
  977. asciidoc:
  978. # Some built-in AsciiDoc attributes are not applicable in the Antora
  979. # environment. These attributes include data-uri, allow-uri-read, docinfo,
  980. # linkcss, noheader, nofooter, webfonts, and outfilesuffix.
  981. attributes:
  982. # previous and next page navigation, uses nav.adoc
  983. page-pagination: ''
  984. idprefix: ''
  985. idseparator: '-'
  986. #add an &lt;orgname&gt; element
  987. orgname: 'jMonkeyEngine'
  988. # Site wide setting of javaDoc url. Soft set using '@' allows override at
  989. # component and page level.
  990. link-javadoc: 'https://javadoc.jmonkeyengine.org/v3.3.2-stable@'
  991. # Enables the UI macros (button, menu and kbd)
  992. experimental: ''
  993. # Adds an anchor in front of the section title when the mouse cursor hovers
  994. # over it.
  995. :sectanchors: ''
  996. extensions:
  997. # Twitter Emoji
  998. # see: https://github.com/Mogztter/asciidoctor-emoji
  999. - asciidoctor-emoji
  1000. runtime:
  1001. cache_dir: ./.cache/antora
  1002. fetch: true</code></pre>
  1003. </div>
  1004. </div>
  1005. <div class="admonitionblock note">
  1006. <table>
  1007. <tr>
  1008. <td class="icon">
  1009. <i class="fa icon-note" title="Note"></i>
  1010. </td>
  1011. <td class="content">
  1012. See: <a href="https://docs.antora.org/antora/2.3/playbook/set-up-playbook/">Set Up a Playbook</a> for detailed <code>key: value</code> explanations.
  1013. </td>
  1014. </tr>
  1015. </table>
  1016. </div>
  1017. <div class="admonitionblock important">
  1018. <table>
  1019. <tr>
  1020. <td class="icon">
  1021. <i class="fa icon-important" title="Important"></i>
  1022. </td>
  1023. <td class="content">
  1024. The branches key is set to <code>antora-setup</code>. The <a href="_attachments/wiki-playbook.yml">wiki-playbook.yml</a> in the <code>transition-docs `module is set to use the `master</code> branch for versioning.
  1025. </td>
  1026. </tr>
  1027. </table>
  1028. </div>
  1029. </div>
  1030. </div>
  1031. </li>
  1032. <li>
  1033. <p>Add the <a href="_attachments/antora.yml">antora.yml</a> file to the <code>docs</code> folder. It must be located next to the <code>modules</code> folder.</p>
  1034. <div class="listingblock">
  1035. <div class="title">antora.yml</div>
  1036. <div class="content">
  1037. <pre class="highlightjs highlight"><code>name: docs
  1038. title: Docs
  1039. version: master
  1040. start_page: ROOT:jme3.adoc
  1041. nav:
  1042. - modules/ROOT/nav.adoc</code></pre>
  1043. </div>
  1044. </div>
  1045. </li>
  1046. <li>
  1047. <p>Add the <code>nav.adoc</code> file to the <code>docs/modules/ROOT</code> folder. It must be in the top-level of the <code>ROOT</code> folder.</p>
  1048. <div class="listingblock">
  1049. <div class="title">nav.adoc</div>
  1050. <div class="content">
  1051. <pre class="highlightjs highlight"><code class="language-text hljs" data-lang="text">* &lt;&lt;documentation#,Getting Started&gt;&gt;
  1052. * {link-javadoc}[JavaDoc]
  1053. * &lt;&lt;jme3#,jMonkeyEngine 3&gt;&gt;
  1054. ** Beginner Tutorials
  1055. *** &lt;&lt;jme3/beginner/hello_simpleapplication#,Hello SimpleApplication&gt;&gt;
  1056. *** &lt;&lt;jme3/beginner/hello_node#,Hello Node&gt;&gt;
  1057. *** &lt;&lt;jme3/beginner/hello_asset#,Hello Asset&gt;&gt;
  1058. *** &lt;&lt;jme3/beginner/hello_main_event_loop#,Hello Main Event Loop&gt;&gt;
  1059. *** &lt;&lt;jme3/beginner/hello_input_system#,Hello Input System&gt;&gt;
  1060. *** &lt;&lt;jme3/beginner/hello_material#,Hello Material&gt;&gt;
  1061. *** &lt;&lt;jme3/beginner/hello_animation#,Hello Animation&gt;&gt;
  1062. *** &lt;&lt;jme3/beginner/hello_picking#,Hello Picking&gt;&gt;
  1063. *** &lt;&lt;jme3/beginner/hello_collision#,Hello Collision&gt;&gt;
  1064. *** &lt;&lt;jme3/beginner/hello_terrain#,Hello Terrain&gt;&gt;
  1065. *** &lt;&lt;jme3/beginner/hello_audio#,Hello Audio&gt;&gt;
  1066. *** &lt;&lt;jme3/beginner/hello_effects#,Hello Effects&gt;&gt;
  1067. *** &lt;&lt;jme3/beginner/hello_physics#,Hello Physics&gt;&gt;
  1068. ** Intermediate Tutorials
  1069. *** Concepts
  1070. **** &lt;&lt;jme3/intermediate/best_practices#,Best Practices&gt;&gt;
  1071. **** &lt;&lt;jme3/intermediate/simpleapplication#,Simple Application&gt;&gt;
  1072. **** &lt;&lt;jme3/features#,Features&gt;&gt;
  1073. **** &lt;&lt;jme3/intermediate/optimization#,Optimization&gt;&gt;
  1074. **** &lt;&lt;jme3/faq#,FAQ&gt;&gt;
  1075. *** Math Concepts
  1076. **** &lt;&lt;jme3/math_for_dummies#,Math For Dummies&gt;&gt;
  1077. **** &lt;&lt;jme3/intermediate/math#,Math&gt;&gt;
  1078. **** &lt;&lt;jme3/math#,More Math&gt;&gt;
  1079. **** &lt;&lt;jme3/rotate#,Rotate&gt;&gt;
  1080. **** &lt;&lt;jme3/math_video_tutorials#,Math Video Tutorials&gt;&gt;
  1081. *** 3D Graphics Concepts
  1082. **** &lt;&lt;jme3/intermediate/multi-media_asset_pipeline#,Multi-Media Asset Pipeline&gt;&gt;
  1083. **** &lt;&lt;jme3/scenegraph_for_dummies#,Scenegraph for Dummies&gt;&gt;
  1084. **** &lt;&lt;jme3/beginner/hellovector#,Hello Vector&gt;&gt;
  1085. **** &lt;&lt;jme3/terminology#,Terminology&gt;&gt;
  1086. **** &lt;&lt;jme3/intermediate/how_to_use_materials#,How to Use Materials&gt;&gt;
  1087. **** &lt;&lt;jme3/intermediate/transparency_sorting#,Transparency and Sorting&gt;&gt;
  1088. **** &lt;&lt;jme3/external/blender#,Importing from Blender&gt;&gt;
  1089. **** &lt;&lt;jme3/external/3dsmax#,Importing from 3DS Max&gt;&gt;
  1090. * &lt;&lt;logo#,Logo Usage&gt;&gt;
  1091. * &lt;&lt;bsd_license#,License&gt;&gt;
  1092. * &lt;&lt;github_tips#,Github Tips&gt;&gt;
  1093. .SDK
  1094. * &lt;&lt;sdk#,jMonkeyEngine SDK&gt;&gt;</code></pre>
  1095. </div>
  1096. </div>
  1097. </li>
  1098. <li>
  1099. <p>Stage, commit and push everything to the repo.</p>
  1100. </li>
  1101. </ol>
  1102. </div>
  1103. </li>
  1104. <li>
  1105. <p>From the (CLI):</p>
  1106. <div class="olist loweralpha">
  1107. <ol class="loweralpha" type="a">
  1108. <li>
  1109. <p>Edit the main.yml file, uncommenting the <code>Run with CI</code>, <code>Build Docs</code>, <code>Deploy Docs</code> commands. If this is for the official wiki site, uncomment the <code>cname</code> key as well.</p>
  1110. <div class="listingblock">
  1111. <div class="content">
  1112. <pre class="highlightjs highlight"><code> - name: Run with CI
  1113. run: npm ci
  1114. - name: Build Docs
  1115. run: npm run buildDocs
  1116. - name: Deploy Docs
  1117. uses: peaceiris/actions-gh-pages@v3
  1118. with:
  1119. github_token: ${{ secrets.GITHUB_TOKEN }}
  1120. # Commits these files to gh-pages if and only if there are changes.
  1121. publish_dir: ./build/site
  1122. # Insert CNAME for repository.
  1123. cname: wiki.jmonkeyengine.org</code></pre>
  1124. </div>
  1125. </div>
  1126. </li>
  1127. <li>
  1128. <p>Add, commit and push the <code>antora-setup</code> branch to the repo.</p>
  1129. </li>
  1130. </ol>
  1131. </div>
  1132. </li>
  1133. </ol>
  1134. </div>
  1135. <div class="paragraph">
  1136. <p>The build will succeed but if we examine the log file we find that the emoji.adoc page is broken. This is due to format changes using the new emoji macro.</p>
  1137. </div>
  1138. <div class="olist arabic">
  1139. <ol class="arabic">
  1140. <li>
  1141. <p>Issue a pull request from the Atom Editor.</p>
  1142. </li>
  1143. <li>
  1144. <p>To save time, replace the <code>docs/modules/ROOT/pages/wiki/emoji.adoc</code> file with the <code>emoji.adoc</code> file found inside <code>transition-docs</code> module.</p>
  1145. </li>
  1146. </ol>
  1147. </div>
  1148. <div class="paragraph">
  1149. <p>We are now down to one last set of warnings that need attention. When we examine the build log we see:</p>
  1150. </div>
  1151. <div class="listingblock">
  1152. <div class="content">
  1153. <pre class="highlightjs highlight"><code class="language-text hljs" data-lang="text">WARNING: skipping reference to missing attribute: home
  1154. WARNING: skipping reference to missing attribute: appname
  1155. WARNING: skipping reference to missing attribute: home
  1156. WARNING: skipping reference to missing attribute: appname
  1157. WARNING: skipping reference to missing attribute: 0
  1158. WARNING: skipping reference to missing attribute: 1
  1159. WARNING: skipping reference to missing attribute: 2</code></pre>
  1160. </div>
  1161. </div>
  1162. <div class="paragraph">
  1163. <p>The <code>home</code> and <code>appname</code> missing attributes are due to unescaped content in the <code>docs/modules/ROOT/pages/sdk/update_center.adoc</code> file. This folder will be removed in the future but to stop the errors for now, fix the offending content.</p>
  1164. </div>
  1165. <div class="olist arabic">
  1166. <ol class="arabic">
  1167. <li>
  1168. <p>Escape one of the brackets in each string <code>${HOME}</code> and <code>${APPNAME}</code>.</p>
  1169. <div class="listingblock">
  1170. <div class="content">
  1171. <pre class="highlightjs highlight"><code>"`$pass:[{]HOME}/.$pass:[{]APPNAME}/version`"
  1172. "`$pass:[{]HOME}/.$pass:[{]APPNAME}/nightly`"</code></pre>
  1173. </div>
  1174. </div>
  1175. </li>
  1176. <li>
  1177. <p>The second set of warning comes from the <code>docs/modules/ROOT/pages/jme3/advanced/logging.adoc</code> file. To fix this, look for and escape the string <code>{0},{1},{2}</code>.</p>
  1178. <div class="listingblock">
  1179. <div class="content">
  1180. <pre class="highlightjs highlight"><code>`++{0},{1},{2}++`</code></pre>
  1181. </div>
  1182. </div>
  1183. </li>
  1184. <li>
  1185. <p>Stage, commit and push everything to the repo after editing.</p>
  1186. </li>
  1187. </ol>
  1188. </div>
  1189. </div>
  1190. </div>
  1191. <div class="sect1">
  1192. <h2 id="cleanup"><a class="anchor" href="#cleanup"></a>Cleanup</h2>
  1193. <div class="sectionbody">
  1194. <div class="paragraph">
  1195. <p>Delete the following from the <code>antora-setup</code> branch:</p>
  1196. </div>
  1197. <div class="ulist checklist">
  1198. <ul class="checklist">
  1199. <li>
  1200. <p><i class="fa fa-check-square-o"></i> .editorconfig</p>
  1201. </li>
  1202. <li>
  1203. <p><i class="fa fa-check-square-o"></i> .gitignore</p>
  1204. </li>
  1205. <li>
  1206. <p><i class="fa fa-check-square-o"></i> .travis.yml</p>
  1207. </li>
  1208. <li>
  1209. <p><i class="fa fa-check-square-o"></i> build.gradle</p>
  1210. </li>
  1211. <li>
  1212. <p><i class="fa fa-check-square-o"></i> deploy_ghpages.sh</p>
  1213. </li>
  1214. <li>
  1215. <p><i class="fa fa-check-square-o"></i> gradlew</p>
  1216. </li>
  1217. <li>
  1218. <p><i class="fa fa-check-square-o"></i> gradle.bat</p>
  1219. </li>
  1220. <li>
  1221. <p><i class="fa fa-check-square-o"></i> src directory (slim templates)</p>
  1222. </li>
  1223. <li>
  1224. <p><i class="fa fa-check-square-o"></i> lib directory</p>
  1225. </li>
  1226. <li>
  1227. <p><i class="fa fa-check-square-o"></i> gradle/wrapper</p>
  1228. <div class="olist arabic">
  1229. <ol class="arabic">
  1230. <li>
  1231. <p>Add the new README.adoc file from the <code>transition-docs</code> module to the root of the repository.</p>
  1232. </li>
  1233. <li>
  1234. <p>Stage, commit and push everything to the repo after editing.</p>
  1235. </li>
  1236. </ol>
  1237. </div>
  1238. </li>
  1239. </ul>
  1240. </div>
  1241. </div>
  1242. </div>
  1243. <div class="sect1">
  1244. <h2 id="merge-to-master"><a class="anchor" href="#merge-to-master"></a>Merge to Master</h2>
  1245. <div class="sectionbody">
  1246. <div class="paragraph">
  1247. <p>Once testing reveals everything is correctly setup, change the following settings to prepare for the final step of merging the antora-setup branch into master.</p>
  1248. </div>
  1249. <div class="olist arabic">
  1250. <ol class="arabic">
  1251. <li>
  1252. <p>Change the following settings:</p>
  1253. <div class="olist loweralpha">
  1254. <ol class="loweralpha" type="a">
  1255. <li>
  1256. <p>Set the <code>branches:</code> value <code>antora-setup</code> to <code>master</code></p>
  1257. <div class="openblock">
  1258. <div class="content">
  1259. <div class="listingblock">
  1260. <div class="title">main.yml</div>
  1261. <div class="content">
  1262. <pre class="highlightjs highlight"><code>on:
  1263. push:
  1264. branches: '*'</code></pre>
  1265. </div>
  1266. </div>
  1267. <div class="paragraph">
  1268. <p>and remove the <code>ref: antora-setup</code> from the <code>Clone the repo</code> command.</p>
  1269. </div>
  1270. <div class="listingblock">
  1271. <div class="content">
  1272. <pre class="highlightjs highlight"><code>steps:
  1273. - name: Clone the repo
  1274. uses: actions/checkout@v2
  1275. with:
  1276. # Number of commits to fetch. 0 indicates all history.
  1277. fetch-depth: 1</code></pre>
  1278. </div>
  1279. </div>
  1280. </div>
  1281. </div>
  1282. </li>
  1283. <li>
  1284. <p>Set the <code>branches: [antora-setup]</code> value in the <code>wiki-playbook.yml</code> to point to HEAD.</p>
  1285. <div class="listingblock">
  1286. <div class="content">
  1287. <pre class="highlightjs highlight"><code>content:
  1288. sources:
  1289. - url: .
  1290. branches: HEAD</code></pre>
  1291. </div>
  1292. </div>
  1293. </li>
  1294. </ol>
  1295. </div>
  1296. </li>
  1297. <li>
  1298. <p>Add, commit and push the <code>antora-setup</code> branch to the repository.</p>
  1299. </li>
  1300. <li>
  1301. <p>Checkout the master branch, merge the <code>antora-setup</code> branch to <code>master</code> and push to the repository.</p>
  1302. <div class="listingblock">
  1303. <div class="content">
  1304. <pre class="highlightjs highlight"><code>git checkout master
  1305. git merge antora-setup
  1306. git push origin master</code></pre>
  1307. </div>
  1308. </div>
  1309. </li>
  1310. <li>
  1311. <p>Delete the <code>antora-setup</code> setup branch.</p>
  1312. <div class="listingblock">
  1313. <div class="content">
  1314. <pre class="highlightjs highlight"><code>git push -d origin antora-setup</code></pre>
  1315. </div>
  1316. </div>
  1317. </li>
  1318. </ol>
  1319. </div>
  1320. </div>
  1321. </div>
  1322. <div class="sect1">
  1323. <h2 id="post-rename-cache-commit"><a class="anchor" href="#post-rename-cache-commit"></a>Post Rename Cache Commit</h2>
  1324. <div class="sectionbody">
  1325. <div class="paragraph">
  1326. <p>After the branch rename, change the workflow file <code>EndBug/add-and-commit@v4</code> &#8220;add&#8221; command to commit the cache upon changes.</p>
  1327. </div>
  1328. <div class="listingblock">
  1329. <div class="content">
  1330. <pre class="highlightjs highlight"><code># Commits these files to root if and only if there are changes.
  1331. add: "package-lock.json package.json ./.cache/antora/*"</code></pre>
  1332. </div>
  1333. </div>
  1334. <div class="paragraph">
  1335. <p>After add, commit and pushing the workflow file, the cache will be committed to the repository master branch.</p>
  1336. </div>
  1337. </div>
  1338. </div>
  1339. </article>
  1340. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  1341. <div class="toc-menu"></div>
  1342. </aside>
  1343. </div>
  1344. </main>
  1345. </div>
  1346. <footer class="footer">
  1347. <p>This page was built using the Antora default UI.</p>
  1348. <p>The source code for this UI is licensed under the terms of the MPL-2.0 license.</p>
  1349. </footer>
  1350. <script src="../../_/js/site.js"></script>
  1351. <script async src="../../_/js/vendor/highlight.js"></script>
  1352. </body>
  1353. </html>