# Cli
**Source:** https://de.divanshu.doctunes.io/docs/cli
**Language:** German

---

Home Dokumente CLI 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 dev npm Skript

Startet den lokalen Entwicklungsserver auf Port 3000 mit Hot Reloading.

bash

```
npm run dev
```

npm run build npm Skript

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

bash

```
npm run build
```

npm run lint npm Skript

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

bash

```
npm run lint
```

npx serve out npm 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
```

← Zurück zur Architektur Weiter: Konfiguration