Files
thptqg/2016/.github/workflows/deploy.yml
T
tiennm99 372f1e04fb feat: add GitHub Pages app with custom SQL query support
- React + Vite + sql.js frontend with two-tab UI:
  - Quick search by exam ID (alphanumeric) or student name
  - Custom SQL query editor with 7 preset queries
- Build script handles all 5 Excel data formats (varied column
  orders, separate score columns, no-header, .xls/.xlsx)
- Database: 877,461 students with exam center, gender, 12 subjects
  (including 4 foreign languages: French, German, Japanese, Chinese)
- GitHub Actions CI/CD: build DB, gzip compress, deploy to Pages
- Safety: read-only queries only, auto LIMIT 1000, Ctrl+Enter shortcut
2026-04-14 20:05:38 +07:00

56 lines
1.0 KiB
YAML

name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build database
run: npm run build:db
- name: Compress database
run: gzip -k -9 public/thptqg2016.db
- name: Build site
run: npm run build
- name: Remove uncompressed db from dist
run: rm -f dist/thptqg2016.db
- uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4