Skip to content

Preview docs migration to esp docs #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9238ac9
Merge RTD to ESP-Docs
pedrominatel Sep 18, 2023
bdd9d1c
Documentation CI build changed to ESP-Docs
pedrominatel Sep 19, 2023
58d7bf9
Fix documentation CI build
pedrominatel Sep 19, 2023
11e53c5
Docs build target fix
pedrominatel Sep 19, 2023
e515a6a
Added CI for deploy docs
pedrominatel Sep 19, 2023
7326a41
Fix index.rst title wirh ESP target
pedrominatel Sep 19, 2023
e2f52db
Added versions to JS file and docs as artifact
pedrominatel Sep 25, 2023
f7151e0
Resolving ADC conflict issue
pedrominatel Dec 4, 2023
5f9928c
Merge branch 'master' into docs_migration_to_esp_docs
pedrominatel Dec 7, 2023
f9a5f4b
Merge conflicts resolved in the new docs
pedrominatel Dec 7, 2023
36aaf87
Fixed the path for the ResetReason example
pedrominatel Dec 7, 2023
9c8ebf5
Added new releases to the Arduino versions file
pedrominatel Dec 7, 2023
4b94ead
Fixed the JSON wrong link
pedrominatel Dec 7, 2023
a19317b
Removed the version and target selection for now
pedrominatel Dec 7, 2023
91da8c6
Documentation build and deploy CI changed
pedrominatel Dec 8, 2023
f99d784
Fixed env vars from server side
pedrominatel Dec 8, 2023
9a72b42
Fixed env vars from server side URL base
pedrominatel Dec 8, 2023
b75b6a3
Deploy on preview server
pedrominatel Dec 8, 2023
637c4e9
Deploy on preview server add type var
pedrominatel Dec 8, 2023
2891641
Deploy on preview server - Change the URL
pedrominatel Dec 8, 2023
b997f4c
Deploy on preview server CI changes
pedrominatel Dec 11, 2023
bbbc35b
Deploy on preview server CI changes
pedrominatel Dec 11, 2023
31d0250
Test new build path
pedrominatel Dec 11, 2023
ea78b10
Test new build path
pedrominatel Dec 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 55 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ReadTheDocs CI
name: Documentation Build and Deploy CI

on:
push:
Expand All @@ -16,7 +16,7 @@ on:
jobs:

build-docs:
name: Build ReadTheDocs
name: Build ESP-Docs
runs-on: ubuntu-22.04
defaults:
run:
Expand All @@ -34,5 +34,56 @@ jobs:
sudo apt install python3-pip python3-setuptools
# GitHub CI installs pip3 and setuptools outside the path.
# Update the path to include them and run.
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r ./docs/requirements.txt
cd ./docs && PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" make html
cd ./docs
PATH=/home/runner/.local/bin:$PATH pip3 install -r requirements.txt --prefer-binary
PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" build-docs -l en
- name: Archive Docs
uses: actions/upload-artifact@v2
with:
name: docs
path: docs

deploy-preview-docs:
name: Deploy Documentation
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Deploy Preview
env:
# Deploy to production server
# DOCS_BUILD_DIR: "./docs/_build/"
# DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_DEPLOY_KEY }}
# DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
# DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_SERVER_USER }}
# DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
# DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
# Deploy to preview server
TYPE: "preview"
# DOCS_BUILD_DIR: "./docs/_build"
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }}
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }}
run: |
sudo apt update
sudo apt install python3-pip python3-setuptools
source ./docs/utils.sh
add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
export GIT_VER=$(git describe --always)
echo "PIP install requirements..."
pip3 install --user -r ./docs/requirements.txt
echo "Building the Docs..."
cd ./docs && build-docs -l en
echo "Deploy the Docs..."
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/
cd $GITHUB_WORKSPACE/docs
deploy-docs
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
configuration: docs/en/conf.py

python:
install:
Expand Down
28 changes: 0 additions & 28 deletions docs/Makefile

This file was deleted.

File renamed without changes
16 changes: 16 additions & 0 deletions docs/_static/arduino_versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var DOCUMENTATION_VERSIONS = {
DEFAULTS: { has_targets: false,
supported_targets: [ "esp32" ]
},
VERSIONS: [
{ name: "latest", has_targets: true, supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c3", "esp32h2", "esp32c6" ] },
],
IDF_TARGETS: [
{ text: "ESP32", value: "esp32"},
{ text: "ESP32-S2", value: "esp32s2"},
{ text: "ESP32-S3", value: "esp32s3"},
{ text: "ESP32-C3", value: "esp32c3"},
{ text: "ESP32-H2", value: "esp32h2"},
{ text: "ESP32-C6", value: "esp32c6"},
]
};
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
54 changes: 54 additions & 0 deletions docs/conf_common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# ---------------------------------------------------------------

from esp_docs.conf_docs import * # noqa: F403,F401

languages = ["en"]

# idf_targets = [
# "esp32",
# "esp32s2",
# "esp32s3",
# "esp32c3",
# "esp32c6",
# "esp32h2",
# ]

# link roles config
github_repo = "espressif/arduino-esp32"

# context used by sphinx_idf_theme
html_context["github_user"] = "espressif"
html_context["github_repo"] = "arduino-esp32"

html_static_path = ["../_static"]

# Conditional content

extensions += ['sphinx_copybutton',
'sphinx_tabs.tabs',
'esp_docs.esp_extensions.dummy_build_system',
]

# ESP32_DOCS = [
# "index.rst",
# ]

# ESP32S2_DOCS = ESP32_DOCS
# ESP32C3_DOCS = ESP32S2_DOCS
# ESP32S3_DOCS = ESP32S2_DOCS
# ESP32C6_DOCS = ESP32S2_DOCS
# ESP32H2_DOCS = ESP32S2_DOCS

# conditional_include_dict = {
# "esp32": ESP32_DOCS,
# "esp32s2": ESP32S2_DOCS,
# "esp32c3": ESP32C3_DOCS,
# "esp32s3": ESP32S3_DOCS,
# "esp32c6": ESP32C6_DOCS,
# "esp32h2": ESP32H2_DOCS,
# }

# Extra options required by sphinx_idf_theme
project_slug = "arduino-esp32"

# versions_url = "./_static/arduino_versions.js"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/source/api/i2c.rst → docs/en/api/i2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ The I2C can be used in two different modes:
* **I2C Master Mode**
* In this mode, the ESP32 generates the clock signal and initiates the communication with the slave device.

.. figure:: ../_static/arduino_i2c_master.png
.. figure:: ../../_static/arduino_i2c_master.png
:align: center
:width: 720
:figclass: align-center

* **I2C Slave Mode**
* The slave mode, the clock is generated by the master device and responds to the master if the destination address is the same as the destination.

.. figure:: ../_static/arduino_i2c_slave.png
.. figure:: ../../_static/arduino_i2c_slave.png
:align: center
:width: 520
:figclass: align-center
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ To get started with Reset Reason, you can try:
Reset Reason
************

.. literalinclude:: ../../../libraries/ESP32/examples/ResetReason/ResetReason.ino
.. literalinclude:: ../../../libraries/ESP32/examples/ResetReason/ResetReason/ResetReason.ino
:language: arduino
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/source/api/wifi.rst → docs/en/api/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Working as AP
In this mode, the ESP32 is configured as an Access Point (AP) and it's capable of receiving incoming connections from other devices (stations) by providing
a Wi-Fi network.

.. figure:: ../_static/wifi_esp32_ap.png
.. figure:: ../../_static/wifi_esp32_ap.png
:align: center
:width: 520
:figclass: align-center
Expand All @@ -33,7 +33,7 @@ Working as STA

The STA mode is used to connect the ESP32 to a Wi-Fi network, provided by an Access Point.

.. figure:: ../_static/wifi_esp32_sta.png
.. figure:: ../../_static/wifi_esp32_sta.png
:align: center
:width: 520
:figclass: align-center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ No. Name Type [1]_ Function
Pin Layout
----------

.. figure:: ../_static/esp32-c3_devkitM-1_pinlayout.png
.. figure:: ../../_static/esp32-c3_devkitM-1_pinlayout.png
:align: center
:width: 600
:alt: ESP32-C3-DevKitM-1 (click to enlarge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ No. Name Type Function
Pin Layout
----------

.. figure:: ../_static/esp32_devkitC_pinlayout.png
.. figure:: ../../_static/esp32_devkitC_pinlayout.png
:align: center
:width: 600
:alt: ESP32-DevKitC-1 (click to enlarge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ No. Name Type Function
Pin Layout
----------

.. figure:: ../_static/esp32-s2_saola1_pinlayout.png
.. figure:: ../../_static/esp32-s2_saola1_pinlayout.png
:align: center
:width: 600
:alt: ESP32-S2-Saola-1 (click to enlarge)
Expand Down
5 changes: 3 additions & 2 deletions docs/source/boards/boards.rst → docs/en/boards/boards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The ESP32 is divided by family:
* Wi-Fi only
* ESP32-C
* Wi-Fi and BLE 5
* IEEE 802.15.4 (only in ESP32-C6)
* ESP32-H
* BLE and IEEE 802.15.4

Expand All @@ -30,7 +31,7 @@ For each family, we have SoC variants with some differentiation. The differences
The modules use the SoC internally, including the external flash, PSRAM (in some models) and other essential electronic components. Essentially, all
modules from the same family use the same SoC.

.. figure:: ../_static/soc-module.png
.. figure:: ../../_static/soc-module.png
:align: center
:width: 250
:alt: ESP32 SoC and Module (click to enlarge)
Expand Down Expand Up @@ -60,7 +61,7 @@ Before buying: Keep in mind that for some "must have" features when choosing the
Espressif
---------

.. figure:: ../_static/logo_espressif.png
.. figure:: ../../_static/logo_espressif.png
:align: center
:width: 250
:alt: Espressif Logo
Expand Down
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
#
# English Language RTD & Sphinx config file
#
# Uses ../conf_common.py for most non-language-specific settings.

# Importing conf_common adds all the non-language-specific
# parts to this conf module

try:
from conf_common import * # noqa: F403,F401
except ImportError:
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
from conf_common import * # noqa: F403,F401

import datetime
current_year = datetime.datetime.now().year

# General information about the project.
project = u'Arduino ESP32'
copyright = u'2016 - {}, Espressif Systems (Shanghai) Co., Ltd'.format(current_year)
pdf_title = u'Arduino ESP32 Documentation Guide'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = 'en'

# Tracking ID for Google Analytics
google_analytics_id = 'G-F58JM78930'
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You can check the results in `LIBRARIES_TEST.md`_.

The results file example:

.. image:: _static/external_library_test_schedule.png
.. image:: ../_static/external_library_test_schedule.png
:width: 600

Pull Request test result
Expand All @@ -113,20 +113,20 @@ Pull Request test result
If the test run on Pull Request, it will compile all libraries and sketches 2 times (before/after changes in PR) to see, if the PR is breaking/fixing libraries.
In the table the results are in order ``BEFORE -> AFTER``.

.. image:: _static/external_library_test_pr.png
.. image:: ../_static/external_library_test_pr.png
:width: 600

.. |success| image:: _static/green_checkmark.png
.. |success| image:: ../_static/green_checkmark.png
:height: 2ex
:class: no-scaled-link

.. |warning| image:: _static/warning.png
.. |warning| image:: ../_static/warning.png
:height: 2ex
:class: no-scaled-link

.. |fail| image:: _static/cross.png
.. |fail| image:: ../_static/cross.png
:height: 2ex
:class: no-scaled-link

.. _LIBRARIES_TEST.md: https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md
.. _lib.json: https://github.com/espressif/arduino-esp32/.github/workflow/lib.json
.. _lib.json: https://github.com/espressif/arduino-esp32/blob/master/.github/workflows/lib.json
File renamed without changes.
10 changes: 5 additions & 5 deletions docs/source/getting_started.rst → docs/en/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Supported Operating Systems
| Windows | Linux | macOS |
+-------------------+-------------------+-------------------+

.. |windows-logo| image:: _static/logo_windows.png
.. |linux-logo| image:: _static/logo_linux.png
.. |macos-logo| image:: _static/logo_macos.png
.. |windows-logo| image:: ../_static/logo_windows.png
.. |linux-logo| image:: ../_static/logo_linux.png
.. |macos-logo| image:: ../_static/logo_macos.png

Supported IDEs
---------------------------
Expand All @@ -79,8 +79,8 @@ Here is the list of supported IDE for Arduino ESP32 support integration.
| Arduino IDE | PlatformIO |
+-------------------+-------------------+

.. |arduino-logo| image:: _static/logo_arduino.png
.. |pio-logo| image:: _static/logo_pio.png
.. |arduino-logo| image:: ../_static/logo_arduino.png
.. |pio-logo| image:: ../_static/logo_pio.png

See `Installing Guides <installing.html>`_ for more details on how to install the Arduino ESP32 support.

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ After that, you can use the following structure to include the image in the docs

.. code-block::

.. figure:: ../_static/arduino_i2c_master.png
.. figure:: ../../_static/arduino_i2c_master.png
:align: center
:width: 720
:figclass: align-center
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ The USB Mass Storage Class, or USB MSC, is a class used for storage devices, lik
This option can be used to ``Enable`` or ``Disable`` this function at the boot. If this option is ``Enabled``, once the device is connected via USB, one new storage device will appear in the system as a storage drive.
Use this new storage drive to write and read files or to drop a new firmware binary to flash the device.

.. figure:: ../_static/usb_msc_drive.png
.. figure:: ../../_static/usb_msc_drive.png
:align: center
:width: 720
:figclass: align-center
Expand Down
Loading