Skip to content

Commit

Permalink
Add esp-web-tools installer (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeroniemi authored May 2, 2024
1 parent f8a2460 commit aa9743f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/pio-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,28 @@ jobs:
name: firmware
path: |
.pio/build/**/*_merged.bin
- run: |
mkdir -p _site/firmware
cp .pio/build/m5knob/firmware_merged.bin _site/firmware/esp32-s3.bin
cp manifest.json _site/firmware/manifest.json
cp static/* _site/
- name: Create GitHub Pages assets
uses: actions/upload-pages-artifact@v3
deploy-pages:
runs-on: ubuntu-latest
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
17 changes: 17 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "CircleHome",
"version": "v1",
"home_assistant_domain": "circlehome",
"new_install_prompt_erase": true,
"builds": [
{
"chipFamily": "ESP32-S3",
"parts": [
{
"path": "esp32-s3.bin",
"offset": 0
}
]
}
]
}
13 changes: 13 additions & 0 deletions static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html>
<head>

</head>
<body>
<script
type="module"
src="https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module"></script>
<esp-web-install-button
manifest="https://aeroniemi.github.io/circlehome/firmware/manifest.json"></esp-web-install-button>
</body>
</html>

0 comments on commit aa9743f

Please sign in to comment.