Skip to main content
Use this guide for Arduino-style projects — sketch folders with a matching .ino file and a board identifier (FQBN). The firmngin/ota GitHub Action handles build and upload when platformio.ini is not present.

When to use Arduino CLI CI/CD

Sketch path in your repo

Set arduino-sketch to the sketch path relative to the repository root. You can include or omit the .ino extension — the action accepts both.
The path must match where the .ino file actually lives in your repo after checkout.

Layout A — sketch in a subfolder (Arduino IDE default)

Use a folder whose name matches the .ino filename (Arduino convention):
Place keys.h in the same folder as the .ino file:

Layout B — sketch at repo root

A single .ino at the repository root is also valid:
A lone .ino at the root is fine when you set arduino-sketch explicitly. If you omit arduino-sketch and rely on auto-detect, the action picks the first .ino it finds — use an explicit path when the repo has more than one sketch.

Complete workflow example (single device)

GitHub Secrets

Add keys.h to .gitignore — never commit it.

What the action handles

For Arduino builds, firmngin/ota prepares dependencies, compiles your sketch, uploads firmware, and triggers OTA when configured. No separate library install step is required in your workflow.

Board identifier (FQBN)

Find the correct value in Arduino IDE or Arduino CLI board list. Common ESP targets:

Fleet OTA via template

Inject keys.h in a prior step when using the Firmngin library.

Local verification

Build locally with the same board target before pushing. Install the Firmngin Arduino library and place keys.h beside your sketch.

Common issues

Security

  • Never commit keys.h.
  • Store credentials only in GitHub Secrets.
  • Remove hardcoded WiFi passwords from sketches before pushing to public repos.