Skip to content

Commit 5bce623

Browse files
authored
[skip changelog] Move website versioning information out of CONTRIBUTING.md (#1386)
* [skip changelog] Fix broken workflow link The GitHub Actions workflow used to deploy the documentation website was renamed to a filename more suitable for existence in a collection of reusable workflows that have multiple variations according to project requirements. The link to the file was not updated accordingly, which resulted it breaking. * [skip changelog] Move website versioning information out of CONTRIBUTING.md This content is for maintainers, and is not of interest to the average contributor. It makes an already overly long contributor guide even more overwhelming, and thus likely to be skipped. The documentation versioning and publishing system is now maintained in a centralized repository hosting a collection of reusable project assets. The documentation content previously located in CONTRIBUTING.md has all been migrated there and expanded. Since this is not high level contributor guidelines, it will be better to maintain it in a single place, linking to that documentation as needed.
1 parent f04d18f commit 5bce623

File tree

1 file changed

+6
-37
lines changed

1 file changed

+6
-37
lines changed

docs/CONTRIBUTING.md

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -287,35 +287,6 @@ website; every time a change is pushed to this special branch, GitHub automatica
287287
change and publish a new version of the website. Do not open Pull Requests to push changes to the `gh-pages` branch,
288288
that will be done exclusively from the CI.
289289

290-
#### Docs versioning
291-
292-
In order to provide support for multiple Arduino CLI releases, Documentation is versioned so that visitors can select
293-
which version of the documentation website should be displayed. Unfortunately this feature isn't provided by GitHub
294-
pages or MkDocs, so we had to implement it on top of the generation process.
295-
296-
Before delving into the details of the generation process, here follow some requirements that were established to
297-
provide versioned documentation:
298-
299-
- A special version of the documentation called `dev` is provided to reflect the status of the Arduino CLI on the
300-
`master` branch - this includes unreleased features and bugfixes.
301-
- Docs are versioned after the minor version of an Arduino CLI release. For example, Arduino CLI `0.99.1` and `0.99.2`
302-
will be both covered by documentation version `0.99`.
303-
- The landing page of the documentation website will automatically redirect visitors to the most recently released
304-
version of the Arduino CLI.
305-
306-
To implement the requirements above, the execution of MkDocs is wrapped using a CLI tool called [Mike][10] that does a
307-
few things for us:
308-
309-
- It runs MkDocs targeting subfolders named after the Arduino CLI version, e.g. documentation for version `0.10.1` can
310-
be found under the folder `0.10`.
311-
- It injects an HTML control into the documentation website that lets visitors choose which version of the docs to
312-
browse from a dropdown list.
313-
- It provides a redirect to a version we decide when visitors hit the landing page of the documentation website.
314-
- It pushes generated contents to the `gh-pages` branch.
315-
316-
> **Note:** unless you're working on the generation process itself, you should never run Mike from a local environment,
317-
> either directly or through the Task `docs:publish`. This might result in unwanted changes to the public website.
318-
319290
#### Docs formatting
320291

321292
To keep the documentation tidy and in order we use [Prettier][prettier-website] to automatically format all Markdown
@@ -340,13 +311,10 @@ case of failures we might ask you to update the PR with correct formatting.
340311
#### Docs automation
341312

342313
In order to avoid unwanted changes to the public website hosting the Arduino CLI documentation, only Mike is allowed to
343-
push changes to the `gh-pages` branch, and this only happens from within the CI, in a workflow named [publish-docs][11].
314+
push changes to the `gh-pages` branch, and this only happens from within the CI, in a workflow named [Deploy
315+
Website][11].
344316

345-
The CI is responsible for guessing which version of the Arduino CLI we're building docs for, so that generated content
346-
will be stored in the appropriate section of the documentation website. Because this guessing might be fairly complex,
347-
the logic is implemented in a Python script called [`build.py`][12]. The script will determine the version of the
348-
Arduino CLI that was modified in the current commit (either `dev` or an official, numbered release) and whether the
349-
redirect to the latest version that happens on the landing page should be updated or not.
317+
Details on the documentation publishing system are available [here][12].
350318

351319
### Internationalization (i18n)
352320

@@ -404,8 +372,9 @@ If your PR doesn't need to be included in the changelog, please start the commit
404372
[7]: https://pages.github.com/
405373
[9]: https://www.mkdocs.org/
406374
[10]: https://github.com/jimporter/mike
407-
[11]: https://github.com/arduino/arduino-cli/blob/master/.github/workflows/publish-docs.yaml
408-
[12]: https://github.com/arduino/arduino-cli/blob/master/docs/build.py
375+
[11]: https://github.com/arduino/arduino-cli/blob/master/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml
376+
[12]:
377+
https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.md
409378
[forum]: https://forum.arduino.cc/index.php?board=145.0
410379
[issues]: #issue-reports
411380
[nightly]: https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds

0 commit comments

Comments
 (0)