Skip to content
Open
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
50 changes: 50 additions & 0 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Pages: deploy config page"

# Publishes data/index.html to GitHub Pages so it's reachable without any
# device serving it — the standalone entry point for USB-serial config
# (#355), when the device has no WiFi and isn't reachable over its own AP.
# The identical file is also baked into the firmware's LittleFS image
# (see data/); the page detects at runtime which context it's running in
# (see the startup probe in data/index.html) and behaves the same either way.
#
# Requires the repository's Pages source to be set to "GitHub Actions"
# (Settings > Pages) — a one-time manual step, not something this workflow
# can configure itself.
on:
push:
branches: [main]
paths:
- 'data/index.html'
- '.github/workflows/pages-deploy.yml'
workflow_dispatch:

concurrency:
group: pages-deploy
cancel-in-progress: false

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 5
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v7

- name: Prepare Pages content
run: |
mkdir -p _site
cp data/index.html _site/index.html

- uses: actions/upload-pages-artifact@v3
with:
path: _site

- id: deployment
uses: actions/deploy-pages@v4
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ After reboot the device joins your WiFi and is reachable at **http://\<devicenam

---

## Configuring over USB (no WiFi/AP needed)

If the device's AP is unreachable, disabled, or just inconvenient, every
setting can also be configured over a USB cable, no network involved:

1. Connect the device to your computer with a USB cable.
2. Open **https://variour.github.io/batteryLight/** in Chrome, Edge, or
Firefox 151+ (Web Serial support required — no Safari).
3. Click **Connect via USB** and select the device's serial port.

This is the exact same interface as the WiFi-connected web UI — the page
detects it isn't reachable over HTTP and switches to talking to the device
over serial instead. See [docs/serial-config.md](docs/serial-config.md) for
how it works under the hood.

---

## Device settings

After first boot, go to **Settings** to review:
Expand Down
Loading