mirror of
https://github.com/tiennm99/thptqg.git
synced 2026-10-15 10:15:44 +00:00
feat: build 3 parallel site variants, one per dataset
Sites: /thptqg2017/ → data/ 861,068 students (baotintuc.vn .xls) /thptqg2017/old/ → data-old/ 847,348 students (original xlsx) /thptqg2017/old2/ → data-old2/ 679,764 students (update/ overrides) Build pipeline: - scripts/build-lib.js: shared schema, score regex, toAscii, insert builder — keeps the 3 DBs drop-in compatible for the same frontend - scripts/build-database.js: multi-sheet walk for baotintuc .xls (HN/HCM overflow past the 65k-per-sheet .xls cap) - scripts/build-database-old.js: single-sheet xlsx + strict numeric SBD guard (rejects the header-row leak present in data-old) - scripts/build-database-old2.js: multi-sheet + blank-row pre-filter for the 54 update files (HCM overflow present, HN not in this subset) - Each build prints a source-vs-DB audit; verified 0 parse errors and exact row-count match across all 3 datasets Frontend plumbing: - vite.config.js: VARIANT env selects base path, publicDir, outDir - package.json: build:db:*, build:db:all, build:old, build:old2, build:all - .github/workflows/deploy.yml: CI builds all 3 DBs + sites - .gitignore: cover public-old/ and public-old2/ outputs - eslint.config.js: add Node globals for config/script files
This commit is contained in:
1 parent
4dd376b921
commit
f82542f764
9 files changed
+396
-189
No files matched your search
Vendored
+14
-8
@@ -28,17 +28,23 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build database
|
||||
run: npm run build:db
|
||||
- name: Build all databases
|
||||
run: npm run build:db:all
|
||||
|
||||
- name: Compress database
|
||||
run: gzip -k -9 public/thptqg2017.db
|
||||
- name: Compress databases
|
||||
run: |
|
||||
gzip -kf -9 public/thptqg2017.db
|
||||
gzip -kf -9 public-old/thptqg2017.db
|
||||
gzip -kf -9 public-old2/thptqg2017.db
|
||||
|
||||
- name: Build site
|
||||
run: npm run build
|
||||
- name: Build all site variants
|
||||
run: npm run build:all
|
||||
|
||||
- name: Remove uncompressed db from dist
|
||||
run: rm -f dist/thptqg2017.db
|
||||
- name: Drop uncompressed DB files from dist
|
||||
run: |
|
||||
rm -f dist/thptqg2017.db
|
||||
rm -f dist/old/thptqg2017.db
|
||||
rm -f dist/old2/thptqg2017.db
|
||||
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user