image: node:16.13

stages:
    - install-dependencies
    - build

Install Dependencies:
    stage: install-dependencies
    script:
        - yarn install
    cache:
        key: ${CI_COMMIT_BRANCH}
        paths:
            - node_modules

Build Nitro:
    stage: build
    script:
        - cp public/renderer-config.json.example public/renderer-config.json
        - cp public/ui-config.json.example public/ui-config.json
        - yarn build:prod
    cache:
        key: ${CI_COMMIT_BRANCH}
        paths:
            - node_modules
    artifacts:
        expire_in: 2 weeks
        paths:
            - build/*