Primer intento
This commit is contained in:
commit
ce20d8c0a9
2 changed files with 60 additions and 0 deletions
27
.github/workflows/convert-to-html-and-upload-to-apache.yml
vendored
Normal file
27
.github/workflows/convert-to-html-and-upload-to-apache.yml
vendored
Normal file
|
|
@ -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
|
||||
33
convert-to-html-and-upload-to-apache.sh
Normal file
33
convert-to-html-and-upload-to-apache.sh
Normal file
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in a new issue