mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 03:07:20 +08:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Frontend
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
jobs:
|
|
build:
|
|
name: build (frontend)
|
|
runs-on: ubuntu-24.04
|
|
defaults:
|
|
run:
|
|
working-directory: web
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: latest
|
|
run_install: true
|
|
package_json_file: web/package.json
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'pnpm'
|
|
cache-dependency-path: web/pnpm-lock.yaml
|
|
- name: Build frontend
|
|
# We need to run the dev server first to generate the auto-imports files
|
|
run: |
|
|
cp .env.production .env
|
|
cp settings/proxy-config.example.ts settings/proxy-config.ts
|
|
pnpm dev &
|
|
sleep 5
|
|
kill %1
|
|
pnpm build
|
|
- name: Upload frontend
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: frontend
|
|
path: web/dist/ # https://github.com/actions/upload-artifact/issues/541 |