|
| 1 | +# "Deploy Website" workflow (MkDocs, Poetry) |
| 2 | + |
| 3 | +Workflow file: [deploy-mkdocs-poetry.yml](deploy-mkdocs-poetry.yml) |
| 4 | + |
| 5 | +Deploy a [MkDocs](https://www.mkdocs.org/)-based static website to [GitHub Pages](https://pages.github.com/). |
| 6 | + |
| 7 | +This is the version of the workflow for projects using the [Poetry](https://python-poetry.org/) dependency management tool. |
| 8 | + |
| 9 | +## Installation |
| 10 | + |
| 11 | +The website build dependencies are managed by [Poetry](https://python-poetry.org/). |
| 12 | + |
| 13 | +Install Poetry by following these instructions:<br /> |
| 14 | +https://python-poetry.org/docs/#installation |
| 15 | + |
| 16 | +If your project does not already use Poetry, you can initialize the [`pyproject.toml`](https://python-poetry.org/docs/pyproject/) file using these commands: |
| 17 | + |
| 18 | +``` |
| 19 | +poetry init --python="^3.9" --dev-dependency="mkdocs@^1.2.1" --dev-dependency="mkdocs-material@^7.1.8" --dev-dependency="mdx_truly_sane_lists@^1.2" |
| 20 | +poetry install |
| 21 | +``` |
| 22 | + |
| 23 | +If already using Poetry, add the tool using this command: |
| 24 | + |
| 25 | +``` |
| 26 | +poetry add --dev "mkdocs@^1.2.1" "mkdocs-material@^7.1.8" "mdx_truly_sane_lists@^1.2" |
| 27 | +``` |
| 28 | + |
| 29 | +Make sure to commit the resulting `pyproject.toml` and `poetry.lock` files. |
| 30 | + |
| 31 | +## Assets |
| 32 | + |
| 33 | +- [mkdocs.yml](assets/mkdocs/mkdocs.yml) - base MkDocs configuration file. |
| 34 | + - Install to: repository root |
| 35 | +- [icon_mac_light.png](assets/mkdocs/icon_mac_light.png) - Arduino logo for the website. **NOTE**: only for use in official Arduino projects. Community projects should use [the Community Logo](https://www.arduino.cc/en/Trademark/CommunityLogo). |
| 36 | + - Install to: `docs/img/` |
| 37 | + |
| 38 | +## Readme badge |
| 39 | + |
| 40 | +Markdown badge: |
| 41 | + |
| 42 | +```markdown |
| 43 | +[](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/deploy-mkdocs-poetry.yml) |
| 44 | +``` |
| 45 | + |
| 46 | +Replace the `REPO_OWNER` and `REPO_NAME` placeholders in the URLs with the final repository owner and name ([example](https://raw.githubusercontent.com/arduino-libraries/ArduinoIoTCloud/master/README.md)). |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +Asciidoc badge: |
| 51 | + |
| 52 | +```adoc |
| 53 | +image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/deploy-mkdocs-poetry.yml/badge.svg["Deploy MkDocs Website status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/deploy-mkdocs-poetry.yml"] |
| 54 | +``` |
| 55 | + |
| 56 | +Define the `{repository-owner}` and `{repository-name}` attributes and use them throughout the readme ([example](https://raw.githubusercontent.com/arduino-libraries/WiFiNINA/master/README.adoc)). |
| 57 | + |
| 58 | +## Commit message |
| 59 | + |
| 60 | +``` |
| 61 | +Add CI workflow to deploy a MkDocs-based website to GitHub Pages |
| 62 | + |
| 63 | +On every push to the repository's default branch, deploy the repository's MkDocs-based static website to GitHub Pages. |
| 64 | +``` |
| 65 | +
|
| 66 | +## PR message |
| 67 | +
|
| 68 | +```markdown |
| 69 | +On every push to the repository's default branch, deploy the repository's [MkDocs](https://www.mkdocs.org/)-based static website to [GitHub Pages](https://pages.github.com/). |
| 70 | +``` |
| 71 | + |
| 72 | +## Related |
| 73 | + |
| 74 | +- ["Check MkDocs Website" workflow](check-mkdocs.md) |
| 75 | +- ["Check Markdown" workflow](check-markdown.md) |
| 76 | +- ["Check Prettier Formatting" workflow](check-prettier-formatting.md) |
| 77 | +- ["Spell Check" workflow](spell-check.md) |
| 78 | +- ["Check YAML" workflow](check-yaml.md) |
0 commit comments