Implement killing the publish process from within the action. Don't let the killing be too generic to avoid potential security issues. Kill process only if it appears as expected.