Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 41 additions & 45 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,45 +101,45 @@ jobs:
name: unraid-api
path: ${{ github.workspace }}/api/deploy/release/*.tgz

build-unraid-ui:
name: Build Unraid UI Library
defaults:
run:
working-directory: unraid-ui
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
cache: "npm"
cache-dependency-path: |
unraid-ui/package-lock.json
node-version-file: ".nvmrc"

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Make Built Node Artifact
run: |
mkdir unraid-ui-dist
mv dist/ unraid-ui-dist/dist/
mv package.json unraid-ui-dist/package.json
ls unraid-ui-dist

- name: Upload Artifact to Github
uses: actions/upload-artifact@v4
with:
name: unraid-ui
path: unraid-ui/unraid-ui-dist
# build-unraid-ui:
# name: Build Unraid UI Library
# defaults:
# run:
# working-directory: unraid-ui
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
#
# - name: Install node
# uses: actions/setup-node@v4
# with:
# cache: "npm"
# cache-dependency-path: |
# unraid-ui/package-lock.json
# node-version-file: ".nvmrc"
#
# - name: Install dependencies
# run: npm install
#
# - name: Build
# run: npm run build
#
# - name: Make Built Node Artifact
# run: |
# mkdir unraid-ui-dist
# mv dist/ unraid-ui-dist/dist/
# mv package.json unraid-ui-dist/package.json
# ls unraid-ui-dist
#
# - name: Upload Artifact to Github
# uses: actions/upload-artifact@v4
# with:
# name: unraid-ui
# path: unraid-ui/unraid-ui-dist

build-web:
needs: [build-unraid-ui]
# needs: [build-unraid-ui]
name: Build Web App
environment:
name: production
Expand Down Expand Up @@ -168,15 +168,11 @@ jobs:
web/package-lock.json
node-version-file: "web/.nvmrc"

- name: Remove Existing Unraid UI folder
run: |
rm -r ../unraid-ui
- name: Setup Just
uses: extractions/setup-just@v2

- name: Download Artifact for Unraid UI
uses: actions/download-artifact@v4
with:
name: unraid-ui
path: unraid-ui
- name: Build Unraid UI
run: just ../unraid-ui/setup

- name: Installing node deps
run: npm install
Expand Down
13 changes: 13 additions & 0 deletions unraid-ui/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
default: list-commands

list-commands:
@just --list --justfile {{justfile()}} --list-heading $'\nMonorepo recipes:\n'

# Prepares the repo for development
setup:
npm install
npm run build

clean:
npm run clean
rm -rf node_modules
4 changes: 4 additions & 0 deletions unraid-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
"import": "./dist/tailwind.config.js",
"default": "./dist/tailwind.config.js"
},
"./tailwind.config.ts": {
"import": "./tailwind.config.ts",
"default": "./tailwind.config.ts"
},
"./theme/preset": {
"types": "./dist/theme/preset.d.ts",
"import": "./dist/theme/preset.js"
Expand Down
5 changes: 5 additions & 0 deletions web/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ default:
@just list-commands

setup:
just ../unraid-ui/setup
cp .env.example .env
npm install

clean:
rm -rf .nuxt
rm -rf node_modules
2 changes: 1 addition & 1 deletion web/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'dotenv/config';
import tailwindConfig from '@unraid/ui/tailwind.config';
import tailwindConfig from '@unraid/ui/tailwind.config.ts';
import type { Config } from 'tailwindcss';
import remToRem from './utils/tailwind-rem-to-rem';

Expand Down
Loading