diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ec908a4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build site + run: npm run build + + - name: Check build output + run: | + if [ ! -d "dist" ]; then + echo "Error: dist directory not found" + exit 1 + fi + echo "Build successful! Generated files:" + ls -lh dist/ + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: site-build + path: dist/ + retention-days: 7