Compare commits

...

2 commits

Author SHA1 Message Date
f3b8521c17 gitignore
All checks were successful
/ test (push) Successful in 7s
2024-12-03 18:50:35 +01:00
40aa60fbf3 workflow 2024-12-03 18:49:19 +01:00
3 changed files with 19 additions and 10 deletions

View file

@ -1,7 +1,7 @@
on: [push] on: [push]
jobs: jobs:
automate-ifc: publish:
runs-on: self-hosted runs-on: docker
steps: steps:
- name: Install checkout - name: Install checkout
uses: https://github.com/actions/checkout@v4 uses: https://github.com/actions/checkout@v4
@ -10,16 +10,23 @@ jobs:
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files
uses: https://github.com/tj-actions/changed-files@v42 uses: https://github.com/tj-actions/changed-files@v42
- name: Do computations - name: Update website
env: env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: | run: |
if [[ ! -d web ]] if: ${{ secrets.WEB != '' }}
then run: |
git clone https://git.forgeons.org/rvba/web git clone --recursive https://rvba:${{ secrets.WEB }}@git.forgeons.org/rvba/web
fi cd web
cd web && git pull git config user.email "ci@git.forgeons.org" ; git config user.name "forgeons-web"
cd scripts cd scripts
for file in ${ALL_CHANGED_FILES}; do for file in ${ALL_CHANGED_FILES}; do
./web.sh "$file" ./web.sh "$file"
cd ..
git add .
if git diff-index --quiet HEAD ; then
echo Nothing changed, not pushing
else
git commit -m 'publish' -a
git push
fi

3
dist/.gitignore vendored
View file

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

1
dist/index.html vendored Normal file
View file

@ -0,0 +1 @@
<h1 id="forgeons">Forgeons !</h1>