repositories

daemon-sec-lotl

DÆMONBins: GTFOBins × LOLBAS × WADComs × LOOBins in one filterable catalog

clonegit clone https://git.daemon-sec.xyz/daemon-sec-lotl.git
ci.ymlYAML56 lines1.6 KiBraw download
# Quality gate. Vercel builds and deploys on its own; this workflow exists so a
# broken dataset, a type error or a failing test is visible on the PR / commit
# before (or regardless of) the deploy. Nothing here writes to the repo.
name: CI

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

permissions:
  contents: read

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

jobs:
  quality:
    name: check · test · validate data
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - name: Typecheck (astro check)
        run: npm run check
      - name: Unit tests (node --test)
        run: npm test
      - name: Validate committed dataset
        run: npm run validate:data

  build:
    name: astro build + pagefind
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npm run build
      - name: Sanity-check the output
        run: |
          test -f dist/index.html
          test -f dist/catalog/index.html
          test -f dist/sitemap-index.xml
          test -f dist/pagefind/pagefind.js
          # Canonicals must not point at a redirect (vercel.json: trailingSlash false).
          if grep -q 'rel="canonical" href="[^"]*/"' dist/catalog/index.html; then
            echo "::error::canonical on /catalog carries a trailing slash"; exit 1; fi