Fixed clock flickering #266
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
name: Build, Release & Deploy | |
on: | |
[push] | |
env: | |
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'testing') }} | |
jobs: | |
build-webui: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
repository: 'pixelit-project/WebUI' | |
- name: Use Node.js 💾 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 19.x | |
- name: Install dependencies 🔧 | |
run: npm install | |
- name: Build WebUI 🏗️ | |
run: npm run build | |
- name: Upload build artifacts 💾 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pixelit-webui | |
path: dist | |
build-fw: | |
needs: build-webui | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Cache pip 💾 | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Cache PlatformIO 💾 | |
uses: actions/cache@v3 | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
- name: Set up Python 🐍 | |
uses: actions/setup-python@v4 | |
- name: Download WebUI artifacts 💾 | |
uses: actions/download-artifact@v3 | |
with: | |
name: pixelit-webui | |
path: pixelit-webui-artifact | |
- name: Update webinterface.h 🔧 | |
run: | | |
python .github/webui.py | |
- name: Update version in PixelIt.ino 🔧 | |
run: | | |
python .github/updateversion.py ${{ github.ref_name }} | |
- name: Install pio and its dependencies 🔧 | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
- name: Run PlatformIO build on selected platforms 🏗️ | |
run: platformio run -e d1_mini -e ESP8266 -e wemos_d1_mini32 -e nodemcuv2 | |
- name: Upload build artifacts 💾 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pixelit-firmware | |
path: .pio/build/*/firmware_*.bin | |
release-fw: | |
needs: build-fw | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download artifacts 💾 | |
uses: actions/download-artifact@v3 | |
with: | |
name: pixelit-firmware | |
- name: Display structure of downloaded files 🔍 | |
run: ls -R | |
- name: Upload binaries as release 🚀 | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./*/firmware_*.bin | |
tag: ${{ github.ref }} | |
release_name: ${{ github.ref_name }} | |
overwrite: true | |
file_glob: true | |
prerelease: ${{ env.prerelease }} | |
deploy-webui-gh-pages: | |
runs-on: ubuntu-latest | |
needs: build-webui | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
repository: 'pixelit-project/WebUI' | |
- name: Download artifacts 💾 | |
uses: actions/download-artifact@v3 | |
with: | |
name: pixelit-webui | |
path: webui | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: . # The folder the action should deploy. | |
CLEAN: false # Automatically remove deleted files from the deploy branch |