prueba 2
Some checks failed
Deploy HTML / deploy (push) Failing after 19s

This commit is contained in:
Kristina 2026-05-16 18:32:25 +02:00
parent 5e024cac92
commit ea664b0c70
2 changed files with 14 additions and 34 deletions

View file

@ -6,6 +6,10 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
volumes:
- /srv/devops/data/apache/htdocs:/output
steps:
- uses: actions/checkout@v3

View file

@ -1,36 +1,12 @@
#!/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
-#!/bin/sh
+#!/bin/bash
+set -euo pipefail
- for MD in $(ls *.md)
+ for md in *.md; do
+ [ -f "$md" ] || continue
- echo "USAR scp O ftp O CUALQUIER OTRA COSA PARA SUBIR LOS HTML: $HTML"
- cat $HTML
+ cp "$html" /output/
+ echo "https://portaljack.freeddns.org/${html}"