This commit is contained in:
Kristina 2026-05-16 18:12:07 +02:00
parent 2ae642e467
commit 5e024cac92
3 changed files with 57 additions and 0 deletions

15
.gitea/workflows/ci.yaml Normal file
View file

@ -0,0 +1,15 @@
name: Deploy HTML
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Convertir y desplegar
run: |
chmod +x convertir.sh
./convertir.sh

36
convertir.sh Normal file
View file

@ -0,0 +1,36 @@
#!/bin/sh
dependencies(){
apt update
apt install -y pandoc
}
convert_to_html(){
# NOTA: FICHEROS SIN ESPACIOS EN LOS NOMBRES
for MD in $(ls *.md)
do
local FILENAME="${MD%.*}"
pandoc -o $FILENAME.html $MD
done
}
upload(){
for HTML in $(ls *.html)
do
echo "::::::::::::::::::::::::::::::::::"
echo "USAR scp O ftp O CUALQUIER OTRA COSA PARA SUBIR LOS HTML A UN APACHE: $HTML"
cat $HTML
done
}
main(){
dependencies
convert_to_html
upload
}
main

6
prueba.md Normal file
View file

@ -0,0 +1,6 @@
Hola.
\- Primer intento