Skip to content

Commit fe9d942

Browse files
authored
Merge pull request #291 from adonno/jesserockz-2025-047
2 parents 56d0178 + 1c49186 commit fe9d942

File tree

2 files changed

+75
-4
lines changed

2 files changed

+75
-4
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Publish Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'static/**'
9+
- '.github/workflows/publish-pages.yml'
10+
workflow_run:
11+
workflows:
12+
- Publish Firmware
13+
types:
14+
- completed
15+
pull_request:
16+
paths:
17+
- 'static/**'
18+
- '.github/workflows/publish-pages.yml'
19+
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
build:
27+
name: Build
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout source code
31+
uses: actions/checkout@v4.2.2
32+
33+
- run: mkdir -p output/firmware
34+
35+
- name: Build
36+
uses: actions/jekyll-build-pages@v1.0.13
37+
with:
38+
source: ./static
39+
destination: ./output
40+
41+
- name: Fetch firmware files
42+
uses: robinraju/release-downloader@v1.11
43+
with:
44+
latest: true
45+
fileName: '*'
46+
out-file-path: output/firmware
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3.0.1
50+
with:
51+
path: output
52+
retention-days: 1
53+
54+
publish:
55+
if: github.event_name != 'pull_request'
56+
name: Publish
57+
runs-on: ubuntu-latest
58+
needs:
59+
- build
60+
permissions:
61+
pages: write
62+
id-token: write
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
steps:
67+
- name: Setup Pages
68+
uses: actions/configure-pages@v5.0.0
69+
70+
- name: Deploy to GitHub Pages
71+
id: deployment
72+
uses: actions/deploy-pages@v4.0.5

.github/workflows/publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Build and Publish ESPHome firmware and website
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
release:
5+
types: [published]
76

87
jobs:
98
build-firmware:
@@ -12,7 +11,7 @@ jobs:
1211
with:
1312
files: |
1413
tagreader.yaml
15-
14+
1615
esphome-version: latest
1716
combined-name: project-template
1817
#### Modify above here to match your project ####

0 commit comments

Comments
 (0)