Skip to content

Commit

Permalink
Merge pull request #2 from ApolloAutomation/dev
Browse files Browse the repository at this point in the history
Update Build And Flashing Page
  • Loading branch information
TrevorSchirmer authored Oct 30, 2024
2 parents 78c6495 + 0a049cd commit f50c2f4
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 148 deletions.
143 changes: 0 additions & 143 deletions .github/workflows/build.yml

This file was deleted.

103 changes: 103 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Publish
on:
push:
branches:
- main
workflow_dispatch:
inputs:
version:
description: 'The version of the firmware to build'
required: true
release:
types: [published]

jobs:
build-firmware:
name: Build And Release
uses: esphome/workflows/.github/workflows/build.yml@main
with:
files: |
Integrations/ESPHome/H-1.yaml
esphome-version: stable
combined-name: firmware
release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }}
release-url: ${{ github.event_name == 'release' && github.event.release.html_url || '' }}
release-version: ${{ (github.event_name == 'release' && github.event.release.tag_name) || (github.event_name == 'workflow_dispatch' && inputs.version) || '' }}

build-firmware-d:
name: Build And Release
uses: esphome/workflows/.github/workflows/build.yml@main
with:
files: |
Integrations/ESPHome/H-1D.yaml
esphome-version: stable
combined-name: firmware-d
release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }}
release-url: ${{ github.event_name == 'release' && github.event.release.html_url || '' }}
release-version: ${{ (github.event_name == 'release' && github.event.release.tag_name) || (github.event_name == 'workflow_dispatch' && inputs.version) || '' }}

build-site:
name: Build Site
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Build
uses: actions/[email protected]
with:
source: ./static
destination: ./output
- name: Upload
uses: actions/[email protected]
with:
name: site
path: output

publish:
name: Publish to GitHub Pages
runs-on: ubuntu-latest
needs:
- build-firmware
- build-firmware-d
- build-site
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/[email protected]
with:
name: firmware
path: firmware
- uses: actions/[email protected]
with:
name: firmware-d
path: firmware-d

- name: Copy firmware and manifest
run: |-
mkdir -p output/firmware
cp -r firmware/${{ needs.build-firmware.outputs.version }}/* output/firmware/
- name: Copy firmware and manifest
run: |-
mkdir -p output/firmware-d
cp -r firmware-d/${{ needs.build-firmware.outputs.version }}/* output/firmware-d/
- uses: actions/[email protected]
with:
name: site
path: output

- uses: actions/[email protected]
with:
path: output
retention-days: 1

- name: Setup Pages
uses: actions/[email protected]

- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
2 changes: 1 addition & 1 deletion Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
substitutions:
name: apollo-h-1
version: "24.10.28.1"
version: "24.10.29.1"
device_description: ${name} made by Apollo Automation - version ${version}.

esp32:
Expand Down
4 changes: 4 additions & 0 deletions static/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# CHANGEME: Set these variable to your liking
title: Apollo H-1 Installer
description: Powered by ESPHome and ESP Web Tools
theme: jekyll-theme-slate
14 changes: 10 additions & 4 deletions index.html → static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,16 @@
<div class="content">
<h1>Apollo H-1 Installer</h1>

<p class="button-row" align="center">
<esp-web-install-button manifest="./Integrations/ESPHome/manifest.json">
</esp-web-install-button>
</p>
<div class="button-row" style="display: flex; justify-content: center; gap: 20px; align-items: center;">
<div>
<p>Smart Wifi Firmware</p>
<esp-web-install-button manifest="./firmware/manifest.json"></esp-web-install-button>
</div>
<div>
<p>No Wifi Firmware</p>
<esp-web-install-button manifest="./firmware-d/manifest.json"></esp-web-install-button>
</div>
</div>

<div class="footer">
<a href="https://github.com/ApolloAutomation/H-1"
Expand Down

0 comments on commit f50c2f4

Please sign in to comment.