add pages
Some checks failed
/ test (push) Successful in 8s
/ automate-ifc (push) Has been cancelled

This commit is contained in:
milovann 2024-12-03 15:26:11 +01:00
parent e54d4c5485
commit 084743df2c
5 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,25 @@
on: [push]
jobs:
automate-ifc:
runs-on: self-hosted
steps:
- name: Install checkout
uses: https://github.com/actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files
id: changed-files
uses: https://github.com/tj-actions/changed-files@v42
- name: Do computations
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
if [[ ! -d web ]]
then
git clone https://git.forgeons.org/rvba/web
fi
cd web && git pull
cd scripts
for file in ${ALL_CHANGED_FILES}; do
./web.sh "$file"

1
dist/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.html

1
pages/index.md Normal file
View file

@ -0,0 +1 @@
# Forgeons !

0
scripts/index.html Normal file
View file

10
scripts/web.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
file=$1
filename=$(basename -- "$file")
extension="${filename##*.}"
filename="${filename%.*}"
#echo "making $filename.html"
pandoc ../pages/$filename.md -t html > ../dist/$filename.html