Skip to content

fix: add docs pipeline #1

fix: add docs pipeline

fix: add docs pipeline #1

Workflow file for this run

name: Generate API Docs
on:
push:
branches: [main]
paths:
- 'VoiceNotesAI.Domain/**'
- 'VoiceNotesAI.Infra/**'
- 'VoiceNotesAI.Infra.Interfaces/**'
workflow_dispatch:
concurrency:
group: wiki
cancel-in-progress: true
env:
DOTNET_VERSION: '8.0.x'
jobs:
generate-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install xmldoc2md
run: dotnet tool install -g XMLDoc2Markdown
- name: Build library projects
run: |
dotnet build VoiceNotesAI.Domain/VoiceNotesAI.Domain.csproj -c Release
dotnet build VoiceNotesAI.Infra.Interfaces/VoiceNotesAI.Infra.Interfaces.csproj -c Release
dotnet build VoiceNotesAI.Infra/VoiceNotesAI.Infra.csproj -c Release
- name: Generate Markdown documentation
run: |
mkdir -p wiki/Domain wiki/Infra-Interfaces wiki/Infra
xmldoc2md VoiceNotesAI.Domain/bin/Release/net8.0/VoiceNotesAI.Domain.dll \
--output wiki/Domain --back-button --index-page-name Domain
xmldoc2md VoiceNotesAI.Infra.Interfaces/bin/Release/net8.0/VoiceNotesAI.Infra.Interfaces.dll \
--output wiki/Infra-Interfaces --back-button --index-page-name Infra-Interfaces
xmldoc2md VoiceNotesAI.Infra/bin/Release/net8.0/VoiceNotesAI.Infra.dll \
--output wiki/Infra --back-button --index-page-name Infra
- name: Generate Home page
run: |
cat > wiki/Home.md << 'EOF'
# VoiceNotesAI — API Documentation
Documentação gerada automaticamente a partir do código-fonte.
## Módulos
- [Domain](Domain) — Models, entidades SQLite e helpers
- [Infra.Interfaces](Infra-Interfaces) — Interfaces de serviços e repositórios
- [Infra](Infra) — Implementações de serviços, repositórios e AppDatabase
---
> Atualizado automaticamente via GitHub Actions a cada push em `main`.
EOF
- name: Deploy to Wiki
uses: actions4gh/deploy-wiki@v1
with:
path: wiki