fix(deploy): point Fusion changelog trigger to /routines/:id/trigger
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled

The legacy /api/automations endpoint was retired when the changelog
automation migrated to a Routine record. deploy.yml was still hitting
/automations/<id>/run with the new routine UUID, returning 404 after a
2m timeout (curl -sf swallowed the error, deploy continued non-fatal).

- URL: /api/automations/<id>/run → /api/routines/<id>/trigger
- Add --max-time 120 to bound curl wait time
This commit is contained in:
Fusion
2026-05-12 11:54:41 +00:00
parent ff90497a08
commit 89448e75c2

View File

@@ -60,10 +60,13 @@ jobs:
echo "$(date '+%Y-%m-%d %H:%M:%S') - Deployment complete!"
# NOTE: This trigger only fires when the GitHub Actions SSH-deploy workflow runs.
# Current production deploys are Coolify-driven via git.semih.ai webhooks (see MEMORY.md).
# When the GitHub Actions workflow is re-activated for production, this step will
# automatically call Fusion to create a changelog entry after a successful deploy.
# Fires after a successful PM2 reload. Calls the Fusion Routine API
# (POST /api/routines/<id>/trigger), which runs the changelog auto-publisher
# script: it reads recent github/main commits, summarizes them via DeepSeek,
# and POSTs an entry to /api/changelog/internal.
# FUSION_CHANGELOG_AUTOMATION_ID is the routine UUID (kept as-is for
# backward compatibility; semantically it's a routine ID since the legacy
# /automations endpoint was retired in favor of /routines).
- name: Trigger Fusion changelog automation
if: success()
continue-on-error: true
@@ -72,7 +75,7 @@ jobs:
echo "Fusion changelog secrets not configured — skipping automation trigger"
exit 0
fi
curl -sf -X POST \
curl -sf -X POST --max-time 120 \
-H "Authorization: Bearer ${{ secrets.FUSION_DAEMON_TOKEN }}" \
"https://fusion.semih.ai/api/automations/${{ secrets.FUSION_CHANGELOG_AUTOMATION_ID }}/run?projectId=proj_155fecc31ef14928&scope=project" \
"https://fusion.semih.ai/api/routines/${{ secrets.FUSION_CHANGELOG_AUTOMATION_ID }}/trigger?projectId=proj_155fecc31ef14928&scope=project" \
|| echo "Fusion trigger failed (non-fatal, continuing)"