All checks were successful
Deploy Eplan / deploy (push) Successful in 1s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
2.1 KiB
YAML
63 lines
2.1 KiB
YAML
name: Deploy Eplan
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: docker
|
|
if: startsWith(github.ref, 'refs/tags/v') || contains(github.event.head_commit.message, '[deploy]')
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
|
"https://token:${{ secrets.GIT_TOKEN }}@git.data-it-solution.de/${GITHUB_REPOSITORY}.git" .
|
|
|
|
- name: Deploy nach Dolibarr
|
|
run: |
|
|
DEPLOY_PATH="/mnt/appdata/firma/dolibarr-202509/modules/eplan"
|
|
REF="${GITHUB_REF#refs/*/}"
|
|
|
|
echo "Deploye ${REF} nach ${DEPLOY_PATH} ..."
|
|
|
|
if [ -d "$DEPLOY_PATH" ]; then
|
|
find "$DEPLOY_PATH" -mindepth 1 -not -path '*/.git/*' -not -name '.git' -delete 2>/dev/null || true
|
|
else
|
|
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
|
|
if: success()
|
|
run: |
|
|
wget -q -O- \
|
|
--header="Authorization: ${{ secrets.NTFY_AUTH }}" \
|
|
--header="Title: Eplan deployt" \
|
|
--header="Priority: high" \
|
|
--header="Tags: white_check_mark" \
|
|
--post-data="Eplan ${GITHUB_REF#refs/*/} auf Prod deployt" \
|
|
https://notify.data-it-solution.de/vk-builds || true
|
|
|
|
- name: Notify Failure
|
|
if: failure()
|
|
run: |
|
|
wget -q -O- \
|
|
--header="Authorization: ${{ secrets.NTFY_AUTH }}" \
|
|
--header="Title: Eplan Deploy fehlgeschlagen" \
|
|
--header="Priority: urgent" \
|
|
--header="Tags: rotating_light" \
|
|
--post-data="Deploy fehlgeschlagen — ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}" \
|
|
https://notify.data-it-solution.de/vk-builds || true
|