Skip to content

Commit 3712864

Browse files
committed
fix: deploy firmware to web flasher and fix folder names
- Fix reTerminal firmware folder names in flasher page - Add deploy-flasher job to automatically deploy compiled firmware to docs/flasher/firmware/ - This fixes 'Failed to download manifest' error for reTerminal E1001/E1002
1 parent a4cfd3a commit 3712864

2 files changed

Lines changed: 54 additions & 2 deletions

File tree

.github/workflows/build-firmware.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,3 +647,53 @@ jobs:
647647
body_path: release_body.md
648648
files: firmware/*.zip
649649
if: steps.prep.outputs.version != ''
650+
651+
# Deploy firmware to GitHub Pages (docs/flasher/firmware/)
652+
deploy-flasher:
653+
needs: combine
654+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
655+
runs-on: ubuntu-latest
656+
permissions:
657+
contents: write
658+
steps:
659+
- uses: actions/checkout@v4
660+
with:
661+
token: ${{ secrets.GITHUB_TOKEN }}
662+
663+
- uses: actions/download-artifact@v4
664+
with:
665+
name: all-firmware
666+
path: firmware-temp/
667+
continue-on-error: true
668+
669+
- name: Deploy to docs/flasher/firmware
670+
run: |
671+
if [ ! -d "firmware-temp" ] || [ -z "$(ls -A firmware-temp 2>/dev/null)" ]; then
672+
echo "No firmware to deploy"
673+
exit 0
674+
fi
675+
676+
# Clear existing firmware (but keep the directory structure)
677+
rm -rf docs/flasher/firmware/*
678+
mkdir -p docs/flasher/firmware
679+
680+
# Copy all firmware to docs folder
681+
cp -r firmware-temp/* docs/flasher/firmware/
682+
683+
echo "Deployed firmware:"
684+
find docs/flasher/firmware -type f | head -50
685+
686+
- name: Commit and push firmware
687+
run: |
688+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
689+
git config --local user.name "github-actions[bot]"
690+
691+
# Check if there are changes to commit
692+
if git diff --quiet docs/flasher/firmware/; then
693+
echo "No changes to commit"
694+
exit 0
695+
fi
696+
697+
git add docs/flasher/firmware/
698+
git commit -m "chore: deploy firmware to web flasher [skip ci]"
699+
git push

docs/flasher/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,10 @@ <h2 class="section-title" data-en="Seeed-Specific Firmware" data-zh="Seeed 专
432432
<span class="feature-tag" data-en="E-Paper" data-zh="墨水屏">E-Paper</span>
433433
<span class="feature-tag" data-en="Dashboard" data-zh="仪表板">Dashboard</span>
434434
</div>
435-
<esp-web-install-button manifest="./firmware/reTerminal_E1001_HASubscribe_Display/manifest.json">
435+
<esp-web-install-button manifest="./firmware/reTerminal_E1001/manifest.json">
436436
<button slot="activate" class="install-btn" data-en="Install Firmware" data-zh="安装固件">⚡ Install Firmware</button>
437437
</esp-web-install-button>
438+
<div class="unsupported" data-en="Browser not supported" data-zh="浏览器不支持">Browser not supported</div>
438439
</div>
439440

440441
<!-- reTerminal E1002 -->
@@ -455,9 +456,10 @@ <h2 class="section-title" data-en="Seeed-Specific Firmware" data-zh="Seeed 专
455456
<span class="feature-tag" data-en="6-Color" data-zh="六色">6-Color</span>
456457
<span class="feature-tag" data-en="Dashboard" data-zh="仪表板">Dashboard</span>
457458
</div>
458-
<esp-web-install-button manifest="./firmware/reTerminal_E1002_HASubscribe_Display/manifest.json">
459+
<esp-web-install-button manifest="./firmware/reTerminal_E1002/manifest.json">
459460
<button slot="activate" class="install-btn" data-en="Install Firmware" data-zh="安装固件">⚡ Install Firmware</button>
460461
</esp-web-install-button>
462+
<div class="unsupported" data-en="Browser not supported" data-zh="浏览器不支持">Browser not supported</div>
461463
</div>
462464
</div>
463465
</section>

0 commit comments

Comments
 (0)