image: node:18

stages:
  - test
  - deploy

workflow:
  rules:
   - if: $CI_COMMIT_BRANCH

pages:
  stage: deploy
  script:
    - npm install
    - npm run build -- --output=public
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == "main"

sast:
  stage: test
include:
- template: Security/SAST.gitlab-ci.yml