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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
71 changes: 34 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,62 @@
name: CI / Deploy
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

# Only one deployment at a time; don't cancel in-progress runs on main
concurrency:
group: pages
cancel-in-progress: false

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: Lint, Typecheck & Build
build:
name: Build & Test
runs-on: ubuntu-latest

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

- name: Setup GraalVM (Java 24)
uses: graalvm/setup-graalvm@v1
with:
java-version: '24'
distribution: 'graalvm-community'
cache: 'gradle'

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.13'

- name: Install dependencies
- name: Install frontend dependencies
working-directory: frontend
run: bun install --frozen-lockfile

- name: Lint
- name: Frontend — Lint
working-directory: frontend
run: bun run lint

- name: Typecheck
- name: Frontend — Typecheck
working-directory: frontend
run: bun run typecheck

- name: Build
run: bun run build

- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: dist
- name: Frontend — Test
working-directory: frontend
run: bun run test

deploy:
name: Deploy to GitHub Pages
needs: ci
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
- name: Backend — Test
run: ./gradlew :backend:test

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
- name: Build Single JAR (frontend embedded)
run: ./gradlew :backend:bootJar

steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
- name: Upload JAR artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: mithril-forge-jar
path: backend/build/libs/*.jar
retention-days: 30
44 changes: 43 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### Kotlin ###
.kotlin


# Logs
logs
*.log
Expand All @@ -11,11 +50,14 @@ node_modules
dist
dist-ssr
*.local
.vite

# Frontend build output bundled into Spring Boot static resources
backend/src/main/resources/static/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
Expand Down
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
bun 1.3.13
kotlin 2.3.21
java graalvm-community-24.0.1
Loading
Loading