Firmware: Update frontend #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Firmware and Upload .bin files | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "ESPlant-Firmware/**" | |
- ".github/workflows/build.firmware.workflow.yml" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "ESPlant-Firmware/**" | |
- ".github/workflows/build.firmware.workflow.yml" | |
jobs: | |
build-frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm ci | |
working-directory: ESPlant-Firmware/frontend | |
- name: Build Frontend | |
run: npm run build | |
working-directory: ESPlant-Firmware/frontend | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: frontend | |
path: ESPlant-Firmware/data | |
build-firmware: | |
runs-on: ubuntu-latest | |
needs: build-frontend | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Download Frontend Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: frontend | |
path: ESPlant-Firmware/data | |
- name: Build Firmware | |
run: | | |
docker run --rm -v $PWD:/project -w /project/ESPlant-Firmware -u $UID -e HOME=/tmp espressif/idf idf.py build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware | |
path: | | |
ESPlant-Firmware/build/ESPlant-Firmware.bin | |
ESPlant-Firmware/build/littlefs.bin |