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
14 changes: 8 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
version: 2
updates:
- package-ecosystem: "bun"
- package-ecosystem: "npm"
directory: "/react/"
schedule:
interval: "weekly"
commit-message:
prefix: "[bun]"
prefix: "[npm]"
include: "scope"
target-branch: "react-rewrite"
groups:
dev-deps:
dependency-type: "development"
prod-deps:
dependency-type: "production"
dependencies:
applies-to: version-updates
patterns:
- "*"
exclude-patterns:
- "@biomejs/*"
19 changes: 13 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,28 @@ jobs:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: react/
working-directory: react

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
bun-version: latest
version: latest

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install Dependencies
run: |
bun install --frozen-lockfile --ignore-scripts
pnpm install --frozen-lockfile --ignore-scripts

- name: Build Website
run: bun run build
run: pnpm run build

19 changes: 13 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,27 @@ jobs:
security-events: write
defaults:
run:
working-directory: react/
working-directory: react

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
bun-version: latest
version: latest

- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install Dependencies
run: |
bun install --frozen-lockfile --ignore-scripts
pnpm install --frozen-lockfile --ignore-scripts

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable auto-merge for Dependabot PRs
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
run: gh pr merge --auto --squash "$PR_URL"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: ${{ github.actor != 'dependabot[bot]'}}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Prepare Docker Meta
id: meta
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Biome CLI
uses: biomejs/setup-biome@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Created by Mary Delos Reyes [SIG Design Lead] - [mockup](https://www.figma.com/f

Make sure you have the following:

- [Bun](<https://bun.sh/>)
- [mise](https://mise.jdx.dev/)

Run `bun install --save-dev`, then `bun run dev`.
Run `mise en && mise install`, `pnpm install`, and `pnpm run dev`

A more in-depth introduction (recommended to read) can be found in the [documentation](https://docs.ucmacm.dev).

Expand Down
14 changes: 6 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
FROM oven/bun:1-slim AS build
FROM node:24-trixie-slim AS build

ENV DEBIAN_FRONTEND=noninteractive
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

WORKDIR /website
COPY /react /website

RUN adduser --disabled-password --gecos "" website \
&& chown -R website:website /website/
RUN corepack enable

USER website

RUN bun install --frozen-lockfile --ignore-scripts \
&& bun run build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --ignore-scripts \
&& pnpm run build

FROM nginxinc/nginx-unprivileged:stable-alpine-perl

Expand Down
37 changes: 37 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[tools]
node = "24.9.0"
pnpm = "10.18.0"

lefthook = "latest"

[settings]
experimental = true
pin = true

[hooks]
postinstall = "lefthook install"

[tasks."web:dev"]
alias = ["web:up"]
description = "Start frontend development server. Save file(s) to see changes"
env._.path = "./react/node_modules/.bin"
dir = "{{ config_root }}/react"
run = "vite"

[tasks."web:build"]
description = "Builds the frontend for distribution/preview"
env._.path = "./react/node_modules/.bin"
dir = "{{ config_root }}/react"
run = "tsc && vite build"

[tasks."web:preview"]
description = "Previews frontend"
env._.path = "./react/node_modules/.bin"
dir = "{{ config_root }}/react"
run = "vite preview"

[tasks."web:check"]
description = "Lints and formats the react codebase "
env._.path = "./react/node_modules/.bin"
dir = "{{ config_root }}/react"
run = "biome check --error-on-warnings --write ."
3 changes: 1 addition & 2 deletions react/biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"files": {
"ignoreUnknown": true,
"includes": [
Expand All @@ -9,7 +9,6 @@
"!**/.idea",
"!**/public",
"!**/dist",
"!**/bun.lock",
"!**/src/index.css"
]
},
Expand Down
Loading
Loading