-
Notifications
You must be signed in to change notification settings - Fork 117
82 lines (66 loc) · 1.83 KB
/
build_gui.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build OpenEVSE GUI
permissions:
contents: write
pull-requests: write
on:
workflow_dispatch:
pull_request:
paths:
- gui-v2
- gui-tft/*
jobs:
build:
name: Build the static GUI files
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.head_ref }}
token: ${{ secrets.DEPENDABOT_PAT }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Set up Node JS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
cd gui-v2
npm install
- name: Build GUI
run: |
cd gui-v2
npm run build
- name: Delete the existing pre-built GUI files
run: |
rm -fr src/lcd_static
rm -f src/web_static/*.h
- name: Run PlatformIO
run: |
pio run
git status
- name: Push any changed files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update of pre-built GUI files"