Skip to content

Commit 8670a0b

Browse files
committed
docs: gh-pages deployment
Signed-off-by: Frederic Pillon <frederic.pillon@st.com> Assisted-by: GitHub Copilot
1 parent 9284596 commit 8670a0b

887 files changed

Lines changed: 10181 additions & 1703 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/ISSUE_TEMPLATE/new-variant-request.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ assignees: ''
1515
* Where this hardware can be purchased
1616
* ...
1717

18-
**Note that user can add a STM32 based board following this [wiki](https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-(board))**
18+
**Note that users can add an STM32-based board by following this [variant development guide](https://stm32duino.github.io/development/Add-a-new-variant-%28board%29/)**
1919

2020
Any contribution is welcome, so do not hesitate to submit a PR.
2121

‎.github/workflows/docs-check.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Documentation build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- docs/**
10+
- boards.txt
11+
- mkdocs.yml
12+
- requirements-docs.txt
13+
- .github/workflows/docs-check.yml
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.x"
28+
- run: python -m pip install -r requirements-docs.txt
29+
- run: mkdocs build --strict
30+
- name: Check generated supported boards page is committed
31+
run: git diff --exit-code -- docs/Supported-boards.md || { echo "::error::Run 'python docs/hooks/supported_boards.py' and commit docs/Supported-boards.md"; exit 1; }

‎.github/workflows/publish-docs.yml‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Publish versioned core documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "[0-9]*"
9+
paths:
10+
- docs/**
11+
- boards.txt
12+
- mkdocs.yml
13+
- requirements-docs.txt
14+
- .github/workflows/publish-docs.yml
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
20+
concurrency:
21+
group: publish-root-docs
22+
cancel-in-progress: false
23+
24+
jobs:
25+
publish:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
- uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.x"
34+
- run: python -m pip install -r requirements-docs.txt
35+
- uses: actions/create-github-app-token@v1
36+
id: pages-token
37+
with:
38+
app-id: ${{ secrets.DOCS_PUBLISH_APP_ID }}
39+
private-key: ${{ secrets.DOCS_PUBLISH_APP_PRIVATE_KEY }}
40+
owner: stm32duino
41+
repositories: stm32duino.github.io
42+
permission-contents: write
43+
- name: Configure Pages remote
44+
env:
45+
PAGES_TOKEN: ${{ steps.pages-token.outputs.token }}
46+
run: git remote add pages "https://x-access-token:${PAGES_TOKEN}@github.com/stm32duino/stm32duino.github.io.git"
47+
- name: Publish development documentation
48+
if: github.ref == 'refs/heads/main'
49+
run: |
50+
if git ls-remote --exit-code --heads pages gh-pages >/dev/null; then
51+
mike deploy --remote pages --branch gh-pages --push dev
52+
else
53+
mike deploy --remote pages --branch gh-pages --default dev --push dev
54+
fi
55+
- name: Publish release documentation
56+
if: startsWith(github.ref, 'refs/tags/')
57+
env:
58+
VERSION: ${{ github.ref_name }}
59+
run: |
60+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
61+
echo "Unsupported documentation release tag: $VERSION" >&2
62+
exit 1
63+
fi
64+
latest=$(git tag --list | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
65+
if [[ "$VERSION" == "$latest" ]]; then
66+
mike deploy --remote pages --branch gh-pages --update-aliases --push "$VERSION" latest
67+
mike set-default --remote pages --branch gh-pages --push latest
68+
else
69+
mike deploy --remote pages --branch gh-pages --push "$VERSION"
70+
fi

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Specific
22
build/
3+
site/
34
astyle.out
45
boards.local.txt
56
platform.local.txt

‎CI/codespell/.codespellignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ ore
99
shiftin
1010
socio-economic
1111
DAA
12+
als
1213

‎CI/update/templates/boards_entry.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file help to add generic board entry.
22
# upload.maximum_size and product_line have to be verified
33
# and changed if needed.
4-
# See: https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-%28board%29
4+
# See: https://stm32duino.github.io/development/Add-a-new-variant-%28board%29/
55

66
{% for generic in generic_list %}
77
# Generic {{generic.name}}

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ More information about rebasing can be found at the repository of [edX](https://
9999

100100
### 6. Merged!
101101
When your pull request is merged please update the documentation if the changes require it
102-
[Wiki](https://github.com/stm32duino/Arduino_Core_STM32/wiki)
102+
[Documentation](https://stm32duino.github.io/)

‎README.md‎

Lines changed: 7 additions & 933 deletions
Large diffs are not rendered by default.

‎README_CMAKE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CMake can now be used to build Arduino sketches with this core.
22
Examples of use can be found on this repo: [stm32duino/CMake_workspace](https://github.com/stm32duino/CMake_workspace).
33

44
This README only provides a quick walk-through.
5-
For all the glorious details, please head over to [the wiki](https://github.com/stm32duino/Arduino_Core_STM32/wiki/CMake-presentation).
5+
For the full walkthrough, see the [CMake documentation](https://stm32duino.github.io/cmake/CMake-presentation/).
66

77
# Prerequisites
88

0 commit comments

Comments
 (0)