From 5e024cac92560bd74db14bf4cd68c20c21037693 Mon Sep 17 00:00:00 2001 From: Kristina Date: Sat, 16 May 2026 18:12:07 +0200 Subject: [PATCH] prueba 1 --- .gitea/workflows/ci.yaml | 15 +++++++++++++++ convertir.sh | 36 ++++++++++++++++++++++++++++++++++++ prueba.md | 6 ++++++ 3 files changed, 57 insertions(+) create mode 100644 .gitea/workflows/ci.yaml create mode 100644 convertir.sh create mode 100644 prueba.md diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..310fbbf --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -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 \ No newline at end of file diff --git a/convertir.sh b/convertir.sh new file mode 100644 index 0000000..c84629f --- /dev/null +++ b/convertir.sh @@ -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 + + + diff --git a/prueba.md b/prueba.md new file mode 100644 index 0000000..5320eae --- /dev/null +++ b/prueba.md @@ -0,0 +1,6 @@ +Hola. + + + +\- Primer intento +