prueba 1
This commit is contained in:
parent
2ae642e467
commit
5e024cac92
3 changed files with 57 additions and 0 deletions
15
.gitea/workflows/ci.yaml
Normal file
15
.gitea/workflows/ci.yaml
Normal 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
36
convertir.sh
Normal 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
6
prueba.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
Hola.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\- Primer intento
|
||||||
|
|
||||||
Loading…
Reference in a new issue