summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-and-deploy.yml57
1 files changed, 57 insertions, 0 deletions
diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml
new file mode 100644
index 0000000..08eecef
--- /dev/null
+++ b/.github/workflows/build-and-deploy.yml
@@ -0,0 +1,57 @@
+name: Build and Deploy Web Flasher
+
+on:
+ push:
+ branches:
+ - main
+
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Install PlatformIO
+ run: |
+ pip install platformio
+
+ - name: Build Firmware
+ run: |
+ pio run
+
+ - name: Copy Firmware Files
+ run: |
+ mkdir -p deploy
+
+ cp web-flasher/index.html deploy/
+ cp web-flasher/manifest.json deploy/
+
+ cp .pio/build/*/firmware.bin deploy/
+ cp .pio/build/*/bootloader.bin deploy/
+ cp .pio/build/*/partitions.bin deploy/
+
+ - name: Upload Pages Artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: deploy
+
+ deploy:
+ needs: build
+
+ runs-on: ubuntu-latest
+
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+
+ steps:
+ - name: Deploy
+ id: deployment
+ uses: actions/deploy-pages@v4