jobs: build: runs-on: ubuntu-latest name: Build application steps: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 22 - name: Get NPM cache directory id: npm-cache-dir shell: bash run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} - uses: actions/cache@v4 name: Cache NPM id: npm-cache with: path: ${{ steps.npm-cache-dir.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - run: npm ci name: Install dependencies - run: npm lint name: Lint code - run: npm build name: Build project - run: npm test name: Test project - run: npm build-storybook name: Build storybook - uses: actions/upload-artifact@v4 name: Upload build directories with: name: build-artifacts path: | dist/ build/ .svelte-kit/ storybook-static/