-
Notifications
You must be signed in to change notification settings - Fork 263
43 lines (41 loc) · 1.46 KB
/
build-frontend.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
# Build the frontend from source, and open a pull request to commit the build artifacts.
# This allows Python users to use the React frontend without installing and running Node.
name: Build Frontend
on:
push:
branches:
- 'main'
paths:
- 'helm-frontend/**'
- '.github/workflows/build-frontend.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Yarn
working-directory: ./helm-frontend
run: npm install --global yarn
- name: Install dependencies
working-directory: ./helm-frontend
run: yarn install
- name: Build app
working-directory: ./helm-frontend
run: yarn build --outDir '../src/helm/benchmark/static_build' --emptyOutDir
- name: Write README.md
run: echo -e '# Frontend Build\n\nThis directory is automatically generated by GitHub Actions and contains a static site built from helm-frontend. Do not modify this directory!' > src/helm/benchmark/static_build/README.md
- name: Git add
run: git add --force src/helm/benchmark/static_build
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Build frontend
branch: actions/build-frontend
delete-branch: true
title: 'Build frontend'
body: Auto-generated from GitHub Actions.