diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ba0cf90 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test-and-build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: web + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: web/package-lock.json + - run: npm ci --include=dev + - name: Corpus & register tests + run: npm test + - name: Production build (static export) + run: npm run build + env: + NODE_ENV: production + - name: Verify export output + run: test -f out/index.html && test -f out/gloss-data.json && test -f out/abbreviations/index.html && test -f out/sitemap.xml && echo "out/ verified"