forked from open-webui/open-webui
refac: ci
This commit is contained in:
parent
b391ad12ae
commit
90a03c331d
3 changed files with 33 additions and 18 deletions
43
.github/workflows/format-build-frontend.yaml
vendored
43
.github/workflows/format-build-frontend.yaml
vendored
|
@ -1,25 +1,36 @@
|
|||
name: Bun CI
|
||||
name: Frontend Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 'Format & Build Frontend'
|
||||
env:
|
||||
PUBLIC_API_BASE_URL: ''
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
- run: bun --version
|
||||
- name: Install frontend dependencies
|
||||
run: bun install
|
||||
- name: Format frontend
|
||||
run: bun run format
|
||||
- name: Check for changes after format
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20' # Or specify any other version you want to use
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Format Frontend
|
||||
run: npm run format
|
||||
|
||||
- name: Check for Changes After Format
|
||||
run: git diff --exit-code
|
||||
- name: Build frontend
|
||||
if: always()
|
||||
run: bun run build
|
||||
|
||||
- name: Build Frontend
|
||||
run: npm run build
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue