antora_setup.adoc 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. = Converting the Wiki to Antora
  2. :author: mitm
  3. :revnumber: 1.0
  4. :revdate: 5/9/2020
  5. :experimental:
  6. == Getting Started
  7. Setup is based off link:https://help.github.com/en/actions/language-and-framework-guides/using-nodejs-with-github-actions[Using Node.js with GitHub Actions], link:https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows[Caching dependencies to speed up workflows], and the link:https://docs.antora.org/antora/2.3/install/install-antora/[Install Antora] guides. It is expected that the repository has already been cloned locally.
  8. .Definitions
  9. . GitHub Web Interface (GWI)
  10. . Git Command Line Interface (CLI)
  11. . Continuous Integration (CI)
  12. .Tools needed
  13. . A gitHub account.
  14. . The Atom Editor, setup for using AsciiDoctor.
  15. . Git (CLI).
  16. == Activating Dispatch Event
  17. We use a dispatch_event to build the wiki anytime there are new changes tagged on the wiki-ui repository.
  18. To activate the `Docs Dispatch Event` command, it must share a personal access token, with permissions `public_repo`, with the jMonkeyEngine Wiki.
  19. You setup the token first from your personal account with the token name `WIKI_UI_DISPATCH`.
  20. See: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
  21. Then in the wiki-ui repository under menu:Settings[Secrets] add the new token with the format:
  22. ```
  23. username:token
  24. ```
  25. == Setup of Node.js
  26. GitHub Actions requires a workflow file (main.yml) to be located in a `.github/workflows` folder. In order to use (CI) with the workflow, there must be a `package.json` and `package-lock.json` file located in the root of the repository. Node.js will build and update these files for us.
  27. * We use an action named "`EndBug/add-and-commit@v4`" to commit the `package.json` and `package-lock.json` files to the repository any time there are changes that affect these files.
  28. * We use an action named "`peaceiris/actions-gh-pages@v3`" to publish the built website to the `gh-pages` branch whenever there is a push to the repo.
  29. * We use a `repository_dispatch` 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.
  30. These steps are all built into the workflow file.
  31. [NOTE]
  32. ====
  33. You can edit/add the main.yml from a git (CLI) or the (GWI) only.
  34. 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.
  35. ====
  36. == Prepare Repository
  37. . From the (CLI):
  38. .. Checkout a new branch named `antora-setup`.
  39. .. Create the destination folder `docs/modules/ROOT` in the root of the local repository.
  40. .. Move the folders found inside the Wiki `src/docs/` folder to the destination folder.
  41. +
  42. --
  43. This will be the destination final results.
  44. ```
  45. |-docs
  46. |-modules
  47. |-ROOT
  48. |-images
  49. |-pages
  50. |-resources
  51. ```
  52. [IMPORTANT]
  53. ====
  54. Use `git mv` from the (CLI) to retain all history.
  55. git mv [-v] [-n] <source> <destination>
  56. pass:[*] [-n] option will do nothing; only show what would happen. Remove when ready to complete the move.
  57. ====
  58. [cols="2",header=true]
  59. |===
  60. a|<source>
  61. a|<destination>
  62. a|`src/docs/images`
  63. a|`docs/modules/ROOT/images`
  64. a|`src/docs/resources`
  65. a|`docs/modules/ROOT/resources`
  66. a|`src/docs/asciidocs`
  67. a|`docs/modules/ROOT/pages`
  68. |===
  69. IMPORTANT: The move to the `docs/modules/ROOT/pages` folder is a rename of the `asciidoc` folder. Do not move the folder into pages.
  70. --
  71. .. Add, commit and push the `antora-setup` branch to the repository.
  72. == Setup Workflow
  73. All files for setup can be found inside the `transition-docs` module where this document is located. These are the final configuration files using the `master` branch to trigger builds and assume all steps have been completed and Antora is now in control of the build process for the wiki.
  74. Using the workflow shown below will execute on the `antora-setup` branch pushing the build to the `gh-pages` branch allowing setup to be completed. This will allow for testing the build prior to merging the branch to `master`.
  75. The changes that affect the workflow branch are as follows:
  76. ```
  77. on:
  78. push:
  79. branches: [ antora-setup ]
  80. uses: actions/checkout@v2
  81. with:
  82. ref: antora-setup
  83. ```
  84. TIP: It's a good idea to have the (GWI) actions tab open in a browser so the build can be monitored.
  85. The action `EndBug/add-and-commit@v4` will commit to the branch that triggered the workflow.
  86. . From the (CLI):
  87. .. Create a `.github/workflows` folder in the `antora-setup` branch.
  88. .. Add the initial "`main.yml`" file below as a new workflow.
  89. +
  90. --
  91. NOTE: The initial file is designed to be used in steps, commenting and uncommenting commands as the changeover progresses. The finalized link:{attachmentsdir}/main.yml[main.yml] is in the `transition-docs` module.
  92. .Initial main.yml
  93. [source, yml]
  94. ----
  95. # This file can be used to configure the Node.js build for Antora ci without
  96. # having Node installed locally. See 'transition-docs/antora_setup.adoc' in the root
  97. # of this repo for details of how to use this file.
  98. #
  99. # The action add-and-commit will always commit the package-lock.json,
  100. # package.json and Antora cache only if changes are made to the files.
  101. #
  102. # If the package-lock.json or package.json files are updated or new depends are
  103. # installed, the 'npm ci' should be always ran thereafter to speed up build
  104. # times. When ci is active, the package-lock.json and package.json files in root
  105. # will not be updated.
  106. #
  107. # Uses the action actions-gh-page to publish pages to the gh-pages branch,
  108. # including a required .nojekyll file that Antora requires for configuration.
  109. #
  110. # The 'actions/cache@v2' creates a new cache when the packages in
  111. # package-lock.json file change, or when the workflow runner's operating system
  112. # changes.
  113. name: Build Docs
  114. on:
  115. push:
  116. branches: [ antora-setup ]
  117. # Initiate a build to pull in the wiki-ui repository changes.
  118. repository_dispatch:
  119. types: [wiki-ui-build]
  120. pull_request:
  121. jobs:
  122. build:
  123. #Static version is used to maintain stability.
  124. runs-on: ubuntu-18.04
  125. strategy:
  126. matrix:
  127. #Static version is used to maintain stability.
  128. node-version: [12.17.0]
  129. steps:
  130. - name: Clone the repo
  131. uses: actions/checkout@v2
  132. with:
  133. ref: antora-setup
  134. # Number of commits to fetch. 0 indicates all history.
  135. fetch-depth: 1
  136. - name: Use Node.js ${{ matrix.node-version }}
  137. uses: actions/setup-node@v1
  138. with:
  139. node-version: ${{ matrix.node-version }}
  140. # Display the sha of the build triggering the repository_dispatch event.
  141. - name: wiki-ui-build
  142. if: github.event.action == 'wiki-ui-build'
  143. run: echo wiki-ui-build sha ${{ github.event.client_payload.sha }}
  144. # Uncomment to write the default package.json file to the repo root.
  145. # When used in conjunction with the action add-and-commit 'add' command, the
  146. # file will be written to the repo for editing.
  147. - name: Install default package.json
  148. run: npm init --yes
  149. # Uncomment when adding or updating dependencies in the package-lock.json
  150. # and package.json files for ci.
  151. - name: Install Node
  152. run: npm i
  153. # Uncomment during initial setup or when updating Antora to a new version.
  154. # The action add-and-commit 'add' command will detect the changes and commit
  155. # the package-lock.json and package.json files.
  156. # Emoji support. Seems to be a direct implementation of AsciiDoctor ruby
  157. # extension.
  158. # see: https://github.com/mogztter/asciidoctor-emoji
  159. - name: Install Antora
  160. run: |
  161. npm i @antora/[email protected]
  162. npm i @antora/[email protected]
  163. npm i asciidoctor-emoji
  164. # Uncomment after package-lock.json and package.json files are updated.
  165. # - name: Run with CI
  166. # run: npm ci
  167. - name: Audit Depends
  168. run: npm audit
  169. # - name: Build Docs
  170. # run: npm run buildDocs
  171. # Detects any updates to package-lock.json and package.json and commits the
  172. # files to root.
  173. # see:
  174. # https://github.com/marketplace/actions/add-commit?version=v4.1.0
  175. # for use options.
  176. - name: Commit Packages
  177. uses: EndBug/add-and-commit@v4
  178. with:
  179. author_name: mitm001
  180. author_email: [email protected]
  181. message: "Commit files for CI workflow"
  182. # Commits these files to root if and only if there are changes.
  183. add: "package-lock.json package.json"
  184. env:
  185. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  186. # Antora will not copy folders outside the family tree so we move the
  187. # resources into the build/site folder so the peaceiris action will commit
  188. # the files.
  189. # - name: Copy Tutorials
  190. # run: cp -r ./docs/modules/ROOT/resources/* ./build/site/
  191. # Commit changes to the gh-pages branch. Antora requires an empty
  192. # '.nojekyll' be present in the branch due to certain directories starting
  193. # with an underscore. This action has an option, set by default, to add that
  194. # file for us on commit.
  195. # see:
  196. # https://github.com/marketplace/actions/github-pages-action?version=v3.6.1
  197. # for use options.
  198. # - name: Deploy Docs
  199. # uses: peaceiris/actions-gh-pages@v3
  200. # with:
  201. # github_token: ${{ secrets.GITHUB_TOKEN }}
  202. # Commits these files to gh-pages if and only if there are changes.
  203. # publish_dir: ./build/site
  204. # Insert CNAME for repository.
  205. # cname: wiki.jmonkeyengine.org
  206. ----
  207. The initial main points of interest are as follows.
  208. ```
  209. repository_dispatch:
  210. types: [wiki-ui-build]
  211. ```
  212. When the webhook event `repository_dispatch` is triggered, with a secret `WIKI_UI_DISPATCH` token that matches the same secret token of this repository and with the `event_type` "`wiki-ui-build`", the workflow build will run.
  213. See:
  214. * https://developer.github.com/v3/repos/#create-a-repository-dispatch-event
  215. * https://blog.marcnuri.com/triggering-github-actions-across-different-repositories/
  216. * https://help.github.com/en/actions/reference/events-that-trigger-workflows#external-events-repository_dispatch
  217. ```
  218. #Static version is used to maintain stability.
  219. runs-on: ubuntu-18.04
  220. strategy:
  221. matrix:
  222. #Static version is used to maintain stability.
  223. node-version: [12.17.0]
  224. ```
  225. With the above lines, we are using a static version of `Unbuntu` and `Node.js`. Updates can potentially break things, and we would find out after the fact rather than knowing immediately that there was a problem.
  226. [TIP]
  227. ====
  228. Setting the node version using the matrix strategy has the added benefit of appending the Node.js version to our job `build` on the (GWI) dashboard.
  229. For example, our job name `build`, will have the version `12.17.0` appended like so:
  230. image::vers_append.png[vers_append.png]
  231. ====
  232. ```
  233. - name: Install default package.json
  234. run: npm init --yes
  235. ```
  236. The above line will create our default `package.json` 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.
  237. ```
  238. - name: Install Node
  239. run: npm i
  240. ```
  241. This will install node into our workflow and create our initial `package-lock.json` file. Once the `package-lock.json` 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 `run: npm update` to update depends.
  242. ```
  243. - name: Install Antora
  244. run: |
  245. npm i @antora/[email protected]
  246. npm i @antora/[email protected]
  247. npm i asciidoctor-emoji
  248. ```
  249. The above command will install our Antora depends.
  250. ```
  251. with:
  252. author_name: mitm001
  253. author_email: [email protected]
  254. message: "Commit files for CI workflow"
  255. ```
  256. 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 `repository_dispatch` triggers a workflow. Customize as needed.
  257. ```
  258. # Commits these files to root if and only if there are changes.
  259. add: "package-lock.json package.json*"
  260. ```
  261. This line will commit the `package-lock.json` and `package.json` if there are any changes to the files.
  262. ```
  263. env:
  264. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  265. ```
  266. The `secrets.GITHUB_TOKEN` doesn't have authorization to create any successive events, so we avoid an infinite loop of commit, run workflows, commit, run workflows.
  267. --
  268. .. Add, commit and push the `antora-setup` branch to the repo. The workflow will commit the `package.json` and `package-lock.json` files into the root of the `antora-setup` branch of the repo.
  269. . Issue a pull request. This will pull in the `.json` files.
  270. . Edit the `main.yml` file by commenting out the "`Install default package.json`", "`Install Node`" and "`Install Antora`" commands.
  271. +
  272. ```
  273. # - name: Install default package.json
  274. # run: npm init --yes
  275. # - name: Install Node
  276. # run: npm i
  277. # - name: Install Antora
  278. # run: |
  279. # npm i @antora/[email protected]
  280. # npm i @antora/[email protected]
  281. # npm i asciidoctor-emoji
  282. ```
  283. .. Add, commit and push the `antora-setup` branch to the repo.
  284. . In the Atom Editor:
  285. .. Edit the `package.json` file.
  286. +
  287. --
  288. .package.json
  289. [source, .json]
  290. ----
  291. {
  292. "version": "1.0.1",
  293. "description": "jMonkeyEngine Documentation",
  294. "scripts": {
  295. "buildDocs": "$(npm bin)/antora --stacktrace wiki-playbook.yml"
  296. },
  297. "private": true,
  298. "license": "BSD-3-Clause",
  299. }
  300. ----
  301. NOTE: See: link:https://nodejs.dev/learn/the-package-json-guide[The Package Json Guide], and link:https://nodejs.dev/learn/the-package-lock-json-file[The package-lock.json file] for info on the properties that can be set and their meaning.
  302. --
  303. - [x] Bump `"version": "1.0.1"`.
  304. - [x] Fix the description.
  305. - [x] Remove `test` from the scripts property.
  306. - [x] Add the `buildDocs` script.
  307. - [x] Add the `"private": true,` property.
  308. - [x] Change the license.
  309. .. Edit the `package-lock.json` file:
  310. - [x] Bump `"version": "1.0.1"`.
  311. .. Stage, commit and push the `package.json` and `package-lock.json` files to the repo.
  312. == Preparing Test Site
  313. We only need this step for a repository imported from the wiki, skip otherwise.
  314. . From the (GWI).
  315. .. Switch to the `gh-pages` branch and delete the `CNAME` file.
  316. .. Commit the changes.
  317. .. In the `Settings` tab, set the newly created branch as the "`Source`" under the GitHub Pages settings. The link box for the site will change color to green, indicating it is configured.
  318. +
  319. This will be the branch we deploy the site to using the "`Deploy Docs`" command in the `main.yml` file.
  320. == Setup Antora
  321. Add the configuration files. Once complete, our final source structure will look like so.
  322. ```
  323. |-docs
  324. | |-modules
  325. | | |-ROOT
  326. | | |-nav.adoc
  327. | | |-images
  328. | | |-pages
  329. | | |-resources
  330. | |-antora.yml
  331. |-wiki-playbook.yml
  332. ```
  333. . From the Atom Editor:
  334. .. Add the initial `wiki-playbook.yml` file to the root of the repo.
  335. +
  336. --
  337. .Initial wiki-playbook.yml
  338. ```
  339. site:
  340. title: jMonkeyEngine Docs
  341. url: https://wiki.jmonkeyengine.org
  342. robots: allow
  343. start_page: docs::documentation.adoc
  344. content:
  345. sources:
  346. - url: .
  347. branches: [antora-setup]
  348. start_path: docs
  349. - url: https://github.com/jMonkeyEngine/wiki-ui
  350. branches: HEAD
  351. start_path: docs
  352. ui:
  353. bundle:
  354. url: https://github.com/jMonkeyEngine/wiki-ui/releases/latest/download/ui-bundle.zip
  355. # Required when using cache or fetch will not update ui.
  356. snapshot: true
  357. asciidoc:
  358. # Some built-in AsciiDoc attributes are not applicable in the Antora
  359. # environment. These attributes include data-uri, allow-uri-read, docinfo,
  360. # linkcss, noheader, nofooter, webfonts, and outfilesuffix.
  361. attributes:
  362. # previous and next page navigation, uses nav.adoc
  363. page-pagination: ''
  364. idprefix: ''
  365. idseparator: '-'
  366. #add an <orgname> element
  367. orgname: 'jMonkeyEngine'
  368. # Site wide setting of javaDoc url. Soft set using '@' allows override at
  369. # component and page level.
  370. link-javadoc: 'https://javadoc.jmonkeyengine.org/v3.3.2-stable@'
  371. # Enables the UI macros (button, menu and kbd)
  372. experimental: ''
  373. # Adds an anchor in front of the section title when the mouse cursor hovers
  374. # over it.
  375. :sectanchors: ''
  376. extensions:
  377. # Twitter Emoji
  378. # see: https://github.com/Mogztter/asciidoctor-emoji
  379. - asciidoctor-emoji
  380. runtime:
  381. cache_dir: ./.cache/antora
  382. fetch: true
  383. ```
  384. NOTE: See: link:https://docs.antora.org/antora/2.3/playbook/set-up-playbook/[Set Up a Playbook] for detailed `key: value` explanations.
  385. IMPORTANT: The branches key is set to `antora-setup`. The link:{attachmentsdir}/wiki-playbook.yml[wiki-playbook.yml] in the `transition-docs `module is set to use the `master` branch for versioning.
  386. --
  387. .. Add the link:{attachmentsdir}/antora.yml[antora.yml] file to the `docs` folder. It must be located next to the `modules` folder.
  388. +
  389. .antora.yml
  390. ```
  391. name: docs
  392. title: Docs
  393. version: master
  394. start_page: ROOT:documentation.adoc
  395. nav:
  396. - modules/ROOT/nav.adoc
  397. ```
  398. .. Add the `nav.adoc` file to the `docs/modules/ROOT` folder. It must be in the top-level of the `ROOT` folder.
  399. +
  400. .nav.adoc
  401. [source, text]
  402. ----
  403. * <<documentation#,Getting Started>>
  404. * {link-javadoc}[JavaDoc]
  405. * <<jme3#,jMonkeyEngine 3>>
  406. ** Beginner Tutorials
  407. *** <<jme3/beginner/hello_simpleapplication#,Hello SimpleApplication>>
  408. *** <<jme3/beginner/hello_node#,Hello Node>>
  409. *** <<jme3/beginner/hello_asset#,Hello Asset>>
  410. *** <<jme3/beginner/hello_main_event_loop#,Hello Main Event Loop>>
  411. *** <<jme3/beginner/hello_input_system#,Hello Input System>>
  412. *** <<jme3/beginner/hello_material#,Hello Material>>
  413. *** <<jme3/beginner/hello_animation#,Hello Animation>>
  414. *** <<jme3/beginner/hello_picking#,Hello Picking>>
  415. *** <<jme3/beginner/hello_collision#,Hello Collision>>
  416. *** <<jme3/beginner/hello_terrain#,Hello Terrain>>
  417. *** <<jme3/beginner/hello_audio#,Hello Audio>>
  418. *** <<jme3/beginner/hello_effects#,Hello Effects>>
  419. *** <<jme3/beginner/hello_physics#,Hello Physics>>
  420. ** Intermediate Tutorials
  421. *** Concepts
  422. **** <<jme3/intermediate/best_practices#,Best Practices>>
  423. **** <<jme3/intermediate/simpleapplication#,Simple Application>>
  424. **** <<jme3/features#,Features>>
  425. **** <<jme3/intermediate/optimization#,Optimization>>
  426. **** <<jme3/faq#,FAQ>>
  427. *** Math Concepts
  428. **** <<jme3/math_for_dummies#,Math For Dummies>>
  429. **** <<jme3/intermediate/math#,Math>>
  430. **** <<jme3/math#,More Math>>
  431. **** <<jme3/rotate#,Rotate>>
  432. **** <<jme3/math_video_tutorials#,Math Video Tutorials>>
  433. *** 3D Graphics Concepts
  434. **** <<jme3/intermediate/multi-media_asset_pipeline#,Multi-Media Asset Pipeline>>
  435. **** <<jme3/scenegraph_for_dummies#,Scenegraph for Dummies>>
  436. **** <<jme3/beginner/hellovector#,Hello Vector>>
  437. **** <<jme3/terminology#,Terminology>>
  438. **** <<jme3/intermediate/how_to_use_materials#,How to Use Materials>>
  439. **** <<jme3/intermediate/transparency_sorting#,Transparency and Sorting>>
  440. **** <<jme3/external/blender#,Importing from Blender>>
  441. **** <<jme3/external/3dsmax#,Importing from 3DS Max>>
  442. * <<logo#,Logo Usage>>
  443. * <<bsd_license#,License>>
  444. * <<github_tips#,Github Tips>>
  445. .SDK
  446. * <<sdk#,jMonkeyEngine SDK>>
  447. ----
  448. .. Stage, commit and push everything to the repo.
  449. . From the (CLI):
  450. .. Edit the main.yml file, uncommenting the `Run with CI`, `Build Docs`, `Copy Tutorials`, `Deploy Docs` commands. If this is for the official wiki site, uncomment the `cname` key as well.
  451. +
  452. ```
  453. - name: Run with CI
  454. run: npm ci
  455. - name: Build Docs
  456. run: npm run buildDocs
  457. # Antora will not copy folders outside the family tree so we move the
  458. # resources into the build/site folder so the peaceiris action will commit
  459. # the files.
  460. - name: Copy Tutorials
  461. run: cp -r ./docs/modules/ROOT/resources/* ./build/site/
  462. - name: Deploy Docs
  463. uses: peaceiris/actions-gh-pages@v3
  464. with:
  465. github_token: ${{ secrets.GITHUB_TOKEN }}
  466. # Commits these files to gh-pages if and only if there are changes.
  467. publish_dir: ./build/site
  468. # Insert CNAME for repository.
  469. cname: wiki.jmonkeyengine.org
  470. ```
  471. .. Add, commit and push the `antora-setup` branch to the repo.
  472. 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.
  473. . Issue a pull request from the Atom Editor.
  474. . To save time, replace the `docs/modules/ROOT/pages/wiki/emoji.adoc` file with the `emoji.adoc` file found inside `transition-docs` module.
  475. We are now down to one last set of warnings that need attention. When we examine the build log we see:
  476. [source, text]
  477. ----
  478. WARNING: skipping reference to missing attribute: home
  479. WARNING: skipping reference to missing attribute: appname
  480. WARNING: skipping reference to missing attribute: home
  481. WARNING: skipping reference to missing attribute: appname
  482. WARNING: skipping reference to missing attribute: 0
  483. WARNING: skipping reference to missing attribute: 1
  484. WARNING: skipping reference to missing attribute: 2
  485. ----
  486. The `home` and `appname` missing attributes are due to unescaped content in the `docs/modules/ROOT/pages/sdk/update_center.adoc` file. This folder will be removed in the future but to stop the errors for now, fix the offending content.
  487. . Escape one of the brackets in each string `$pass:[{]HOME}` and `$pass:[{]APPNAME}`.
  488. +
  489. ```
  490. "`$pass:[{]HOME}/.$pass:[{]APPNAME}/version`"
  491. "`$pass:[{]HOME}/.$pass:[{]APPNAME}/nightly`"
  492. ```
  493. . The second set of warning comes from the `docs/modules/ROOT/pages/jme3/advanced/logging.adoc` file. To fix this, look for and escape the string `++{0},{1},{2}++`.
  494. +
  495. ```
  496. `++{0},{1},{2}++`
  497. ```
  498. . Stage, commit and push everything to the repo after editing.
  499. == Cleanup
  500. Delete the following from the `antora-setup` branch:
  501. - [x] .editorconfig
  502. - [x] .gitignore
  503. - [x] .travis.yml
  504. - [x] build.gradle
  505. - [x] deploy_ghpages.sh
  506. - [x] gradlew
  507. - [x] gradle.bat
  508. - [x] src directory (slim templates)
  509. - [x] lib directory
  510. - [x] gradle/wrapper
  511. . Add the new README.adoc file from the `transition-docs` module to the root of the repository.
  512. . Stage, commit and push everything to the repo after editing.
  513. == Merge to Master
  514. 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.
  515. . Change the following settings:
  516. .. Set the `branches:` value `antora-setup` to `master`
  517. +
  518. --
  519. .main.yml
  520. ```
  521. on:
  522. push:
  523. branches: '*'
  524. ```
  525. and remove the `ref: antora-setup` from the `Clone the repo` command.
  526. ```
  527. steps:
  528. - name: Clone the repo
  529. uses: actions/checkout@v2
  530. with:
  531. # Number of commits to fetch. 0 indicates all history.
  532. fetch-depth: 1
  533. ```
  534. --
  535. .. Set the `branches: [antora-setup]` value in the `wiki-playbook.yml` to point to HEAD.
  536. +
  537. ```
  538. content:
  539. sources:
  540. - url: .
  541. branches: HEAD
  542. ```
  543. . Add, commit and push the `antora-setup` branch to the repository.
  544. . Checkout the master branch, merge the `antora-setup` branch to `master` and push to the repository.
  545. +
  546. ```
  547. git checkout master
  548. git merge antora-setup
  549. git push origin master
  550. ```
  551. . Delete the `antora-setup` setup branch.
  552. +
  553. ```
  554. git push -d origin antora-setup
  555. ```
  556. == Post Rename Cache Commit
  557. After the branch rename, change the workflow file `EndBug/add-and-commit@v4` "`add`" command to commit the cache upon changes.
  558. ```
  559. # Commits these files to root if and only if there are changes.
  560. add: "package-lock.json package.json ./.cache/antora/*"
  561. ```
  562. After add, commit and pushing the workflow file, the cache will be committed to the repository master branch.