Skip to content

docs(infrastructure): validar reorganización TASK-REORG-INFRA con documentation-consistency-verifier-agent #264

docs(infrastructure): validar reorganización TASK-REORG-INFRA con documentation-consistency-verifier-agent

docs(infrastructure): validar reorganización TASK-REORG-INFRA con documentation-consistency-verifier-agent #264

Workflow file for this run

name: Deploy Documentation
on:
push:
branches:
- main
- develop
paths:
- 'docs/**'
- 'docs/mkdocs.yml'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'docs/**'
- 'docs/mkdocs.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Para git info plugin de MkDocs
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install MkDocs and dependencies
run: |
pip install --upgrade pip
pip install mkdocs
pip install mkdocs-material
pip install mkdocs-git-revision-date-localized-plugin
pip install mkdocs-minify-plugin
pip install pymdown-extensions
- name: Validate MkDocs configuration
run: |
cd docs
mkdocs build --strict --verbose
- name: Build documentation
run: |
cd docs
mkdocs build --clean
- name: Upload artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: docs/site
deploy:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
check-links:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install mkdocs mkdocs-material
pip install linkchecker
- name: Build docs
run: |
cd docs
mkdocs build
- name: Check for broken links
run: |
linkchecker --check-extern docs/site/ || true
- name: Comment PR with results
if: always()
uses: actions/github-script@v7
with:
script: |
const output = 'Documentation build completed. Check the artifacts for details.';
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
});