chore: remove Next.js and repoint CI at the SvelteKit layout

sync-data.yml now writes static/champions.json. This is the edit that had to
land with the deletion of public/: the workflow reports success regardless of
which path it writes, so a miss would have left the weekly sync green while
the live game 404'd on data load.

deploy.yml publishes build/ and passes BASE_PATH. Adds ci.yml, which runs
test, lint, and build on pull_request and pushes to main -- the repo had no
PR-triggered workflow before, so 'green before merge' was previously
unenforceable.

Deletes app/, components/, lib/, public/, next.config.mjs and
postcss.config.mjs, drops the Next and React dependencies, and swaps ESLint
onto eslint-plugin-svelte. sharp and unrs-resolver left pnpm's allowBuilds
because both arrived with Next and pnpm why now reports no dependents.
This commit is contained in:
tiennm99 committed 2026-07-25 11:18:58 +07:00
1 parent 5f6b8b76c6
commit eae345ecbb
25 files changed
+234 -7760

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm test
- run: pnpm lint
# No BASE_PATH here: this checks that the app compiles. The base-path
# behaviour is verified against a real preview before release.
- run: pnpm build
+2 -2
View File
@@ -31,11 +31,11 @@ jobs:
- run: pnpm build
env:
NEXT_PUBLIC_BASE_PATH: /${{ github.event.repository.name }}
BASE_PATH: /${{ github.event.repository.name }}
- uses: actions/upload-pages-artifact@v5
with:
path: out
path: build
deploy:
needs: build
+4 -4
View File
@@ -29,20 +29,20 @@ jobs:
set -euo pipefail
sha=$(gh api "repos/$SOURCE_REPO/commits/main" --jq .sha)
gh api "repos/$SOURCE_REPO/contents/champions.json?ref=$sha" \
-H "Accept: application/vnd.github.raw" > public/champions.json
-H "Accept: application/vnd.github.raw" > static/champions.json
echo "SOURCE_SHA=${sha:0:7}" >> "$GITHUB_ENV"
- name: Commit if changed
id: commit
run: |
set -euo pipefail
if git diff --quiet -- public/champions.json; then
echo "public/champions.json already matches loldle-data@$SOURCE_SHA"
if git diff --quiet -- static/champions.json; then
echo "static/champions.json already matches loldle-data@$SOURCE_SHA"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add public/champions.json
git add static/champions.json
git commit -m "chore(data): sync champions from loldle-data@$SOURCE_SHA"
git push
echo "changed=true" >> "$GITHUB_OUTPUT"