Skip to content

Commit 602ebc4

Browse files
author
pixelead0
committed
Update CI workflow to use MkDocs for link checking instead of Python HTTP server, improving reliability and readiness time.
1 parent b214629 commit 602ebc4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,24 @@ jobs:
3636

3737
- name: Check for broken links
3838
run: |
39-
# Iniciar servidor HTTP en background
40-
cd site && python -m http.server 8000 &
41-
sleep 10
39+
# Iniciar mkdocs serve en background (mejor que python -m http.server)
40+
mkdocs serve -a 127.0.0.1:8000 &
41+
sleep 15 # Dar más tiempo para que mkdocs serve esté listo
4242
43-
# Ejecutar check de links desde el directorio raíz
44-
cd ${{ github.workspace }}
43+
# Ejecutar check de links
4544
python scripts/check_links.py
4645
4746
# Verificar resultado
4847
broken_count=$(jq '.summary.broken_links' broken_links.json)
4948
5049
if [ "$broken_count" -gt 0 ]; then
5150
echo "❌ Found $broken_count broken links - failing!"
52-
pkill -f "python -m http.server" || true
51+
pkill -f "mkdocs serve" || true
5352
exit 1
5453
fi
5554
5655
echo "✅ All links working!"
57-
pkill -f "python -m http.server" || true
56+
pkill -f "mkdocs serve" || true
5857
5958
# Solo para main: guardar el sitio construido
6059
- name: Upload build artifact

0 commit comments

Comments
 (0)