This commit is contained in:
parent
5e024cac92
commit
ea664b0c70
2 changed files with 14 additions and 34 deletions
|
|
@ -6,6 +6,10 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ubuntu:22.04
|
||||||
|
volumes:
|
||||||
|
- /srv/devops/data/apache/htdocs:/output
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|
|
||||||
44
convertir.sh
44
convertir.sh
|
|
@ -1,36 +1,12 @@
|
||||||
#!/bin/sh
|
-#!/bin/sh
|
||||||
|
+#!/bin/bash
|
||||||
|
+set -euo pipefail
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
|
- 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}"
|
||||||
Loading…
Reference in a new issue