Skip to content

feat: Sistema completo de sedes y corrección de botones críticos #9

feat: Sistema completo de sedes y corrección de botones críticos

feat: Sistema completo de sedes y corrección de botones críticos #9

Workflow file for this run

name: Build and Validate
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-validate:
name: Build and Validate Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run pre-commit checks
uses: pre-commit/[email protected]
- name: Build with MkDocs
run: mkdocs build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check for broken links
run: |
# Iniciar servidor HTTP en background
cd site && python -m http.server 8000 &
sleep 10
# Ejecutar check de links desde el directorio raíz
cd ${{ github.workspace }}
python scripts/check_links.py
# Verificar resultado
broken_count=$(jq '.summary.broken_links' broken_links.json)
if [ "$broken_count" -gt 0 ]; then
echo "❌ Found $broken_count broken links - failing!"
pkill -f "python -m http.server" || true
exit 1
fi
echo "✅ All links working!"
pkill -f "python -m http.server" || true
# Solo para main: guardar el sitio construido
- name: Upload build artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: site
path: site/
retention-days: 1