mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 05:33:24 +00:00
Try 2
This commit is contained in:
32
.github/workflows/compile.yaml
vendored
32
.github/workflows/compile.yaml
vendored
@@ -28,18 +28,42 @@ jobs:
|
|||||||
pio run
|
pio run
|
||||||
|
|
||||||
- name: Make output dir
|
- name: Make output dir
|
||||||
run: mkdir -p output
|
run: |
|
||||||
|
mkdir -p output
|
||||||
|
mkdir -p _site
|
||||||
|
|
||||||
- name: Build Binary
|
- name: Build Binary
|
||||||
run: |
|
run: |
|
||||||
cp ./CYD-Klipper-Display/.pio/build/esp32dev/bootloader.bin output
|
cp ./CYD-Klipper-Display/.pio/build/esp32dev/bootloader.bin output
|
||||||
cp ./CYD-Klipper-Display/.pio/build/esp32dev/partitions.bin output
|
cp ./CYD-Klipper-Display/.pio/build/esp32dev/partitions.bin output
|
||||||
cp ./CYD-Klipper-Display/.pio/build/esp32dev/firmware.bin output
|
cp ./CYD-Klipper-Display/.pio/build/esp32dev/firmware.bin output
|
||||||
cp ~/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin output
|
cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin output
|
||||||
esptool --chip esp32 merge_bin -o ./output/merged-firmware.bin --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 ./output/bootloader.bin 0x8000 ./output/partitions.bin 0xe000 ./output/boot_app0.bin 0x10000 ./output/firmware.bin
|
esptool --chip esp32 merge_bin -o ./output/merged-firmware.bin --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 ./output/bootloader.bin 0x8000 ./output/partitions.bin 0xe000 ./output/boot_app0.bin 0x10000 ./output/firmware.bin
|
||||||
|
|
||||||
- name: Upload artefact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: firmware
|
name: firmware
|
||||||
path: ./output
|
path: ./output
|
||||||
|
|
||||||
|
- name: Make webpage
|
||||||
|
run: |
|
||||||
|
cp -r ./output ./_site
|
||||||
|
python3 generate_manifest.py
|
||||||
|
cp manifest.json ./_site
|
||||||
|
cp manifest_wipe.json ./_site
|
||||||
|
cp index.html ./_site
|
||||||
|
|
||||||
|
- name: Upload GitHub Page Artifact
|
||||||
|
uses: actions/upload-pages-artifact@v2
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v2
|
||||||
50
generate_manifest.py
Normal file
50
generate_manifest.py
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import subprocess, json
|
||||||
|
|
||||||
|
latest_tag = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"])
|
||||||
|
|
||||||
|
data_without_wipe = {
|
||||||
|
"name": "CYD-Klipper-Display",
|
||||||
|
"new_install_prompt_erase": False,
|
||||||
|
"version": latest_tag.decode("utf-8").strip(),
|
||||||
|
"builds": [
|
||||||
|
{
|
||||||
|
"chipFamily": "ESP32",
|
||||||
|
"parts": [
|
||||||
|
{
|
||||||
|
"path": "output/bootloader.bin",
|
||||||
|
"offset": 4096
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "output/partitions.bin",
|
||||||
|
"offset": 32768
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "output/boot_app0.bin",
|
||||||
|
"offset": 57344
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "output/firmware.bin",
|
||||||
|
"offset": 65536
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
data_with_wipe = {
|
||||||
|
"name": "CYD-Klipper-Display",
|
||||||
|
"new_install_prompt_erase": False,
|
||||||
|
"version": latest_tag.decode("utf-8").strip(),
|
||||||
|
"builds": [
|
||||||
|
{
|
||||||
|
"path": "output/merged-firmware.bin",
|
||||||
|
"offset": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
with open("manifest.json", "w") as f:
|
||||||
|
json.dump(data_without_wipe, f, indent=4)
|
||||||
|
|
||||||
|
with open("manifest_wipe.json", "w") as f:
|
||||||
|
json.dump(data_with_wipe, f, indent=4)
|
||||||
12
index.html
Normal file
12
index.html
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<script
|
||||||
|
type="module"
|
||||||
|
src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"
|
||||||
|
></script>
|
||||||
|
|
||||||
|
<esp-web-install-button
|
||||||
|
manifest="https://firmware.esphome.io/esphome-web/manifest.json"
|
||||||
|
></esp-web-install-button>
|
||||||
|
|
||||||
|
<esp-web-install-button
|
||||||
|
manifest="https://firmware.esphome.io/esphome-web/manifest.json"
|
||||||
|
></esp-web-install-button>
|
||||||
Reference in New Issue
Block a user