web/.forgejo/workflows/publish.yml
milovann d7ff607fbd
Some checks failed
/ test (push) Successful in 6s
/ publish (push) Failing after 2m52s
workflow
2024-12-03 18:59:10 +01:00

34 lines
1.1 KiB
YAML

on: [push]
jobs:
publish:
runs-on: docker
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@v45
- name: Update website
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
if: ${{ secrets.WEB != '' }}
run: |
echo "Cloning"
git clone https://rvba:${{ secrets.WEB }}@git.forgeons.org/rvba/web
echo "Cd"
cd web
echo "Config"
git config user.email "ci@git.forgeons.org" ; git config user.name "forgeons-web"
cd scripts
for file in ${ALL_CHANGED_FILES}; do
./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