Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI Riverlabs

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
workflow_call:

jobs:
test-docs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.14
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test the docs built correctly
run: |
mkdocs build -f config/en/mkdocs.yml
mkdocs build -f config/es/mkdocs.yml
57 changes: 57 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy MkDocs (Multi-language)

on:
push:
branches:
- main

permissions:
contents: write

jobs:
test:
uses: ./.github/workflows/ci.yml

docs:
needs: test
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
cache: pip
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

# Build each language into its own subdirectory
- name: Build docs
run: |
mkdocs build -f config/en/mkdocs.yml
mkdocs build -f config/es/mkdocs.yml

# Copy the root redirect index.html into the site folder
- name: Copy root index redirect
run: cp index.html site/index.html

# Deploy the entire site/ folder to gh-pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
publish_branch: gh-pages
50 changes: 50 additions & 0 deletions config/en/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
site_name: Riverlabs user manual
site_url: https://github.com/ICHydro/Riverlabs

docs_dir: "../../docs/en" # Where to find the English markdown files
site_dir: "../../site/en" # Where to put the English HTML files

theme:
name: material
custom_dir: "../../overrides/"
Language: en

plugins:
- search:
lang: en # Set language for search
- section-index
- glightbox

extra: # Language Selection
alternate:
# Switch to English
- name: English
link: /riverlabs/en/
lang: en
# Switch to Spanish
- name: Español
link: /riverlabs/es/
lang: es

markdown_extensions:
- tables
- toc:
permalink: "¤"

extra_css:
- "assets/stylesheets/custom.css"

nav:
- Getting started:
- Overview: index.md
- Technical specifications: techspec.md
- Setting up: start.md
- Programming the logger:
- The Arduino ecosystem: arduino.md
- Uploading code with the Arduino IDE: upload.md
- Data storage and telemetry:
- SD card storage: SDcard.md
- Xbee 3G Modem: xbee3G.md
- Thingsboard: thingsboard.md
- Installation:
- Installation: installation.md
50 changes: 50 additions & 0 deletions config/es/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
site_name: Riverlabs user manual
site_url: https://github.com/ICHydro/Riverlabs

docs_dir: "../../docs/es" # Where to find the Spanish markdown files
site_dir: "../../site/es" # Where to put the Spanish HTML files

theme:
name: material
custom_dir: "../../overrides/"
Language: es

plugins:
- search:
lang: es # Set language for search
- section-index
- glightbox

extra: # Language Selection
alternate:
# Switch to English
- name: English
link: /riverlabs/en/
lang: en
# Switch to Spanish
- name: Español
link: /riverlabs/es/
lang: es

markdown_extensions:
- tables
- toc:
permalink: "¤"

extra_css:
- "assets/stylesheets/custom.css"

nav:
- Inicio:
- Resumen: index.md
- Especificaciones técnicas: techspec.md
- Necesidades de hardware y software: start.md
- Programación del logger:
- El ecosistema Arduino: arduino.md
- Subir codigo con arduino: upload.md
- Almacenamiento de datos y telemetría:
- Almacenamiento en tarjeta SD: SDcard.md
- El modem XBee 3G: xbee3G.md
- Thingsboard: thingsboard.md
- Instalación:
- Instalación: installation.md
8 changes: 0 additions & 8 deletions docs/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions docs/.gitlab-ci.yml

This file was deleted.

6 changes: 0 additions & 6 deletions docs/404.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/Gemfile

This file was deleted.

Loading