name: 'Build'
description: 'Prepares the repo for a job by running the build'

runs:
    using: 'composite'
    steps:
        -   name: Use cache
            id: 'cache'
            uses: actions/cache@v4
            with:
                path: '**/dist/**'
                key: ${{ runner.os }}-build-${{ github.sha }}

        -   name: Build
            shell: bash
            if: steps.cache.outputs.cache-hit != 'true'
            run: |
                npm run build
