stages:
  - build
  - test
  - deploy
  - pages

include:
- remote: "https://gitlab.com/l3montree/devguard/-/raw/main/templates/secret-scanning.yml"
- remote: "https://gitlab.com/l3montree/devguard/-/raw/main/templates/license-scanning.yml"
  inputs:
    environment: "npm"
- remote: "https://gitlab.com/l3montree/devguard/-/raw/main/templates/software-composition-analysis.yml"
  inputs:
    asset_name: l3montree-cybersecurity/projects/badge-api-programm-zendis/assets/badge-api-documentation
    token: "$DEVGUARD_TOKEN"
- remote: "https://gitlab.com/l3montree/devguard/-/raw/main/templates/infrastructure-as-code-scanning.yml"
- remote: "https://gitlab.com/l3montree/devguard/-/raw/main/templates/sast.yml"

pages:
  stage: pages
  image: node:22.12.0@sha256:35a5dd72bcac4bce43266408b58a02be6ff0b6098ffa6f5435aeea980a8951d7
  before_script:
    - npm install
  script:
    - npm run build
    - cp public/sitemap.xml out/
    - cp public/sitemap-0.xml out/
    - cp public/robots.txt out/
  artifacts:
    paths:
      - out
  publish: out
  only:
    - main