diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 310fbbf..b7ed912 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -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 diff --git a/convertir.sh b/convertir.sh index c84629f..64c41d6 100644 --- a/convertir.sh +++ b/convertir.sh @@ -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}" \ No newline at end of file