diff --git a/.gitea/workflows/deploy-docs.yaml b/.gitea/workflows/deploy-docs.yaml index 37478b3..ff2126e 100644 --- a/.gitea/workflows/deploy-docs.yaml +++ b/.gitea/workflows/deploy-docs.yaml @@ -3,10 +3,8 @@ run-name: Deploying ${{ gitea.repository }} docs locally on: push: - branches: - - main - paths: - - "docs/**" + branches: [main] + paths: ["docs/**", "mkdocs.yml", ".gitea/workflows/deploy-docs.yaml"] jobs: deploy-docs: @@ -26,14 +24,14 @@ jobs: - name: Build documentation run: | - cd docs + ls mkdocs build --site-dir ../build - name: Deploy to IIS directory shell: powershell run: | - $projectName = "${{ gitea.repository_name }}" - $basePath = "${{ secrets.DEPLOY_BASE_PATH }}" + $projectName = "${{ vars.GIT_REPOSITORY }}" + $basePath = Join-Path "${{ secrets.DEPLOY_BASE_PATH }}" $targetPath = Join-Path $basePath $projectName # Crear directorio del proyecto si no existe @@ -43,7 +41,7 @@ jobs: New-Item -ItemType Directory -Path $targetPath -Force # Copiar archivos construidos - Copy-Item -Path "build\*" -Destination $targetPath -Recurse -Force + Copy-Item -Path "..\build\*" -Destination $targetPath -Recurse -Force Write-Host "Documentation deployed to: $targetPath" @@ -51,10 +49,11 @@ jobs: shell: powershell run: | $docsPath = "${{ secrets.DEPLOY_BASE_PATH }}" + $docsPath = Join-Path $docsPath $indexPath = Join-Path $docsPath "index.html" # Obtener todos los directorios de documentación - $docFolders = Get-ChildItem -Path $docsPath -Directory | Where-Object { $_.Name -notin @("dev", "test") } | Sort-Object Name + $docFolders = Get-ChildItem -Path $docsPath -Directory | Sort-Object Name # Generar HTML del índice $htmlContent = @" @@ -63,7 +62,7 @@ jobs:
-