Files
Mayne0213 3fef9405f0 INIT(docusaurus): setup GitHub Actions CI/CD
- Add Docusaurus source in docusaurus/ folder
- Create multi-stage Dockerfile (Node.js build + Nginx)
- Configure GitHub Actions for CI and Docker build
- Add nginx config for SPA routing
2026-01-09 22:49:18 +09:00

42 lines
848 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
defaults:
run:
working-directory: docusaurus
jobs:
lint-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: docusaurus/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build Docusaurus site
run: npm run build
- name: Check build output
run: |
if [ ! -d "build" ]; then
echo "Build failed: build directory not found"
exit 1
fi
echo "Build completed successfully"
echo "Build size: $(du -sh build | cut -f1)"