OFFIZIELLER CROSSOVER:STREAMEN SIE X-MEN '97, THE CAPED CRUSADER & AVENGERS: DOOMSDAY (2026)
HomeDokumenteCLI Befehle
CLI & Skripte

Kommandozeilenwerkzeuge & Build-Automatisierung

Alles, was Sie brauchen, um die statische Dokumentationssuite DocTunes lokal und in CI/CD-Pipelines zu erstellen, zu testen, zu linten und bereitzustellen.

npm run devnpm Skript

Startet den lokalen Entwicklungsserver auf Port 3000 mit Hot Reloading.

bash
npm run dev
npm run buildnpm Skript

Kompiliert alle 20 Seiten zu statischem HTML und erstellt sitemap.xml.

bash
npm run build
npm run lintnpm Skript

Führt ESLint für alle TypeScript- und React-Komponenten aus.

bash
npm run lint
npx serve outnpm Skript

Stellt das statische Produktionsverzeichnis 'out' lokal zur Überprüfung bereit.

bash
npx serve out -p 8080

GitHub Actions Workflow für statische Bereitstellung

Fügen Sie diesen Workflow zu .github/workflows/deploy.yml für die automatisierte statische Bereitstellung auf GitHub Pages oder S3 bei jedem Push hinzu:

yaml
name: Statische Dokumentation bereitstellen
on:
  push:
    branches: [main]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npm run build
      - name: Bereitstellung auf GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./out