Test again #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Build & Deploy the ESPHome firmwares for the Home Assistant Glow project. | |
name: Deploy firmware | |
on: | |
push: | |
branches: | |
- klaas-2024-035 | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
build-firmware: | |
uses: klaasnicolaas/home-assistant-glow/.github/workflows/build-firmware.yaml@klaas-2024-035 | |
with: | |
release-url: ${{ github.event.release.html_url }} | |
combined-manifests: | |
name: Combine ${{ matrix.project }} manifests | |
runs-on: ubuntu-latest | |
needs: build-firmware | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- project: home-assistant-glow | |
name: Home Assistant Glow | |
steps: | |
- name: ⤵️ Download specific artifacts | |
uses: actions/[email protected] | |
with: | |
pattern: build-${{ matrix.project }}-* | |
merge-multiple: true | |
path: files | |
run-id: ${{ needs.build-firmware.outputs.run-id }} | |
- name: 🔨 Generate device manifest.json | |
run: | | |
version=$(cat files/*/version | sort -V | tail -n 1) | |
jq -s --arg version "$version" '{"name": "${{ matrix.name }}", "version": $version, "home_assistant_domain": "esphome", "builds":.}' files/*/manifest.json > files/manifest.json | |
- name: 🧪 Display structure of job | |
run: ls -R | |
- name: ⬆️ Upload project artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.project }} | |
path: files | |
retention-days: 1 | |
build-docs: | |
name: Build documentation | |
# if: contains(fromJSON('["workflow_dispatch", "release"]'), github.event_name) && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: combined-manifests | |
steps: | |
- name: ⤵️ Check out code from GitHub | |
uses: actions/[email protected] | |
- name: ⬇️ Download all artifacts | |
uses: actions/[email protected] | |
with: | |
pattern: "!build-*" | |
path: output | |
- name: 🗂️ Move firmware folders to static | |
run: mv output/* docs/static | |
- name: 🧪 Display structure of job | |
run: ls -R | |
- name: 🏗️ Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
- name: 🏗️ Install Docusaurus dependencies | |
run: npm install --frozen-lockfile --non-interactive | |
working-directory: docs | |
- name: 🚀 Build Docusaurus | |
run: npm run build | |
working-directory: docs | |
- name: ⬆️ Upload pages artifacts | |
uses: actions/[email protected] | |
with: | |
path: docs/build | |
# deploy: | |
# name: Deploy to GitHub Pages | |
# runs-on: ubuntu-latest | |
# needs: build-docs | |
# permissions: | |
# pages: write | |
# id-token: write | |
# environment: | |
# name: github-pages | |
# url: ${{ steps.deployment.outputs.page_url }} | |
# steps: | |
# - name: 🏗️ Setup Github Pages | |
# uses: actions/[email protected] | |
# - name: 🚀 Deploy to Github Pages | |
# uses: actions/[email protected] | |
# id: deployment |