From ce20d8c0a9a69f7bd0c11d05b6c7a32f5ccc9e56 Mon Sep 17 00:00:00 2001 From: "alvaro@thinkpad" Date: Sat, 16 May 2026 13:13:12 +0200 Subject: [PATCH] Primer intento --- .../convert-to-html-and-upload-to-apache.yml | 27 +++++++++++++++ convert-to-html-and-upload-to-apache.sh | 33 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/convert-to-html-and-upload-to-apache.yml create mode 100644 convert-to-html-and-upload-to-apache.sh diff --git a/.github/workflows/convert-to-html-and-upload-to-apache.yml b/.github/workflows/convert-to-html-and-upload-to-apache.yml new file mode 100644 index 0000000..bd2011a --- /dev/null +++ b/.github/workflows/convert-to-html-and-upload-to-apache.yml @@ -0,0 +1,27 @@ +name: run-test-on-push +on: + push: + tags: + - release-* + +jobs: + run-script: + runs-on: ubuntu-latest + steps: + - name: Run script 1 + run: uname -a + - name: Run script 2 + run: date + - name: Run script 3 + run: whoami + - name: Run script 4 + run: pwd + - name: Run script 5 + run: hostname -I + - name: Run script 6 + run: hostname + - name: Run script 7 + run: env + - uses: actions/checkout@v4 + - name: Run a script of repository + run: ./convert-to-html-and-upload-to-apache.sh diff --git a/convert-to-html-and-upload-to-apache.sh b/convert-to-html-and-upload-to-apache.sh new file mode 100644 index 0000000..a463307 --- /dev/null +++ b/convert-to-html-and-upload-to-apache.sh @@ -0,0 +1,33 @@ +#!/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 + pandoc -o $MD.html $MD + done +} + +upload(){ + for HTML in $(ls *.md) + do + echo "USAR scp O ftp O CUALQUIER OTRA COSA PARA SUBIR LOS HTML A UN APACHE: $HTML" + done +} + +main(){ + dependencies + convert_to_html + upload +} + +main + + +