cot over #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| ci: | |
| name: Lint, Format & Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check formatting | |
| run: npx prettier --check "src/**/*.{scss,js,pug}" "scripts/**/*.js" "*.json" | |
| - name: Build | |
| run: npm run build | |
| - name: Verify output | |
| run: | | |
| for page in index about services contact shop privacy terms; do | |
| if [ ! -f "dist/${page}.html" ]; then | |
| echo "MISSING: dist/${page}.html" | |
| exit 1 | |
| fi | |
| done | |
| echo "All 7 pages present in dist/" |