Skip to content

Commit 45699c0

Browse files
committed
[Docs] Update the instructions for building and deploying the docs
1 parent 7e9e70c commit 45699c0

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

doc/modules/ROOT/pages/contributing/docs.adoc

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ of the primary ways to discover those. Please, consider improving and extending
88

99
The manual is generated from the AsciiDoc files in the https://github.com/clojure-emacs/cider/tree/master/doc[doc] folder of CIDER's GitHub repo and is published to https://docs.cider.mx.
1010
https://antora.org[Antora] is used to convert the AsciiDoc source into HTML.
11-
Antora's filesystem layout is described https://docs.antora.org/antora/2.0/component-structure/[here].
11+
Antora's filesystem layout is described https://docs.antora.org/antora/3.1/component-structure/[here].
1212

1313
== Installing Antora
1414

@@ -18,10 +18,10 @@ Installing the Antora is super simple:
1818

1919
[source]
2020
----
21-
$ npm i -g @antora/[email protected] @antora/[email protected]
21+
$ npm install
2222
----
2323

24-
Check out https://docs.antora.org/antora/2.0/install/install-antora/[the detailed installation instructions]
24+
Check out https://docs.antora.org/antora/3.1/install/install-antora/[the detailed installation instructions]
2525
if you run into any problems.
2626

2727
== Editing the Docs
@@ -37,27 +37,43 @@ You can build the documentation locally from the https://github.com/clojure-emac
3737

3838
[source,shell]
3939
----
40+
$ git clone https://github.com/clojure-emacs/docs.cider.mx
4041
$ cd docs.cider.mx
41-
$ antora antora-playbook.yml
42+
$ make build
4243
----
4344

45+
To check the generated site you can simply open `build/site/index.html` in your favourite browser.
46+
4447
== Deploying the Docs Site
4548

4649
NOTE: The manual will be regenerated manually periodically by CIDER's Core Team.
4750

4851
We're currently publishing the user manual to GitHub Pages.
49-
The deployment process is simply pushing the generated HTML to GitHub. Simple as that.
50-
There's a simple script in the documentation repository that automates the process of
51-
fetching the latest updates and publishing them:
52+
The deployment is handled by a GitHub Actions workflow that builds and deploys the
53+
documentation every time something is changed in the documentation site's repository.
54+
It can also be triggered manually if needed.
5255

53-
[source,shell]
54-
----
55-
$ cd docs.cider.mx
56-
$ ./deploy
57-
----
56+
== Updating the Playbook
5857

5958
IMPORTANT: Don't forget to update the manual's version metadata when cutting CIDER releases.
6059
It lives in `doc/antora.yml`.
6160

62-
Down the road we plan to automate the process and deploy automatically changes to the manual.
63-
Ideally this should be done by our CI.
61+
When cutting new releases you'll have to updated `antora-playbook.yml` to mention
62+
their relevant tags from which the documentation needs to be build. Here's how this
63+
looks for one of the projects:
64+
65+
[source]
66+
----
67+
- url: https://github.com/clojure-emacs/cider.git
68+
branches: master
69+
tags: ['v1.7.0', 'v1.8.0']
70+
start_path: docs
71+
----
72+
73+
TIP: You need to add one such block for each new CIDER module you're adding to the docs site.
74+
75+
== Troubleshooting
76+
77+
The most common mistake that people make is to forget to update the version of an Antora docs module
78+
after cutting a release. This will result in an error saying you've got the same version in two branches (e.g. `master`
79+
and `v1.0`). Fixing this is pretty simple - just update the version to `master` in `antora.yml`.

0 commit comments

Comments
 (0)