1.1 KiB
1.1 KiB
description
| description |
|---|
| Build, package, and deploy frontend updates via OTA |
This workflow automates the process of building the frontend, packaging it into a LittleFS binary, and uploading it to the ESP32 device.
Important
Ensure
VITE_API_BASEinfrontend/.envis set to the target device's IP address.
Steps
-
Build and Package Frontend Run the following command in the
frontend/directory to build the production assets and create the versioned.binfile:npm run build:esp32 && npm run ota:package -
Deploy Update Run the deployment script to upload the latest version to the device:
npm run ota:deploy -
Verify Update Wait for the device to reboot and verify the changes on the dashboard.
Universal Bundle Option
If you also need to update the firmware, use the universal bundle workflow:
-
Build Firmware From the project root:
idf.py build -
Create Bundle In the
frontend/directory:npm run ota:bundle -
Deploy Bundle In the
frontend/directory:npm run ota:deploy-bundle