fix: Deploy-Workflow nach ImportZugferd-Pattern (rsync + wget ntfy) [deploy]
All checks were successful
Deploy Eplan / deploy (push) Successful in 1s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-04-13 18:25:05 +02:00
parent 3f36379265
commit cc92db066a

View file

@ -12,48 +12,52 @@ jobs:
runs-on: docker runs-on: docker
if: startsWith(github.ref, 'refs/tags/v') || contains(github.event.head_commit.message, '[deploy]') if: startsWith(github.ref, 'refs/tags/v') || contains(github.event.head_commit.message, '[deploy]')
steps: steps:
- name: Notify Start
uses: data/ntfy-action@main
with:
url: https://notify.data-it-solution.de
topic: vk-builds
auth: ${{ secrets.NTFY_AUTH }}
project: Eplan
status: start
- name: Checkout - name: Checkout
run: | run: |
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \ git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
"https://token:${{ secrets.GIT_TOKEN }}@git.data-it-solution.de/${GITHUB_REPOSITORY}.git" . "https://token:${{ secrets.GIT_TOKEN }}@git.data-it-solution.de/${GITHUB_REPOSITORY}.git" .
- name: Deploy nach Prod - name: Deploy nach Dolibarr
run: | run: |
ZIEL="/mnt/appdata/firma/dolibarr-202509/modules/eplan" DEPLOY_PATH="/mnt/appdata/firma/dolibarr-202509/modules/eplan"
mkdir -p "$ZIEL"/{core/modules,admin,langs/de_DE,langs/en_US,lib} REF="${GITHUB_REF#refs/*/}"
cp core/modules/modEplan.class.php "$ZIEL/core/modules/"
cp admin/setup.php "$ZIEL/admin/" echo "Deploye ${REF} nach ${DEPLOY_PATH} ..."
cp lib/eplan.lib.php "$ZIEL/lib/"
cp langs/de_DE/eplan.lang "$ZIEL/langs/de_DE/" if [ -d "$DEPLOY_PATH" ]; then
cp langs/en_US/eplan.lang "$ZIEL/langs/en_US/" find "$DEPLOY_PATH" -mindepth 1 -not -path '*/.git/*' -not -name '.git' -delete 2>/dev/null || true
echo "Deployt nach $ZIEL" else
ls -la "$ZIEL/core/modules/" mkdir -p "$DEPLOY_PATH"
fi
rsync -a \
--exclude='.git' \
--exclude='.forgejo' \
--exclude='.gitignore' \
--exclude='CLAUDE.md' \
./ "$DEPLOY_PATH/"
echo "Deployment erfolgreich: ${REF} -> ${DEPLOY_PATH}"
ls -la "$DEPLOY_PATH/core/modules/"
- name: Notify Success - name: Notify Success
if: success() if: success()
uses: data/ntfy-action@main run: |
with: wget -q -O- \
url: https://notify.data-it-solution.de --header="Authorization: ${{ secrets.NTFY_AUTH }}" \
topic: vk-builds --header="Title: Eplan deployt" \
auth: ${{ secrets.NTFY_AUTH }} --header="Priority: high" \
project: Eplan --header="Tags: white_check_mark" \
status: success --post-data="Eplan ${GITHUB_REF#refs/*/} auf Prod deployt" \
https://notify.data-it-solution.de/vk-builds || true
- name: Notify Failure - name: Notify Failure
if: failure() if: failure()
uses: data/ntfy-action@main run: |
with: wget -q -O- \
url: https://notify.data-it-solution.de --header="Authorization: ${{ secrets.NTFY_AUTH }}" \
topic: vk-builds --header="Title: Eplan Deploy fehlgeschlagen" \
auth: ${{ secrets.NTFY_AUTH }} --header="Priority: urgent" \
project: Eplan --header="Tags: rotating_light" \
status: failure --post-data="Deploy fehlgeschlagen — ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}" \
https://notify.data-it-solution.de/vk-builds || true