Repository: PrefectHQ/prefect
Issue category: Feature Request

Remove `prefect deploy` deployment trigger guards via CLI for OSS
### First check

- [x] I added a descriptive title to this issue.
- [x] I used the GitHub search to find a similar issue and didn't find it.
- [x] I searched the Prefect documentation for this issue.
- [x] I checked that this issue is related to Prefect and not one of its dependencies.

### Bug summary

We should remove guards around triggers for deployments only being supported in Prefect Cloud

### Reproduction

```bash
❯ prefect deploy -n log-flow/flow-a --trigger my_composite_triggers.yaml
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Deployment triggers are only supported on Prefect Cloud. Any triggers defined for the deployment will not be created.                                                                                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Deployment 'log-flow/flow-a' successfully created with id '73de13d9-e126-4c3b-9118-c6532f884851'.                                                                                                           │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

### Error

_No response_

### Versions

```bash
Version:             3.0.0rc1
API version:         0.8.4
Python version:      3.10.4
Git commit:          a7ae33b0
Built:               Fri, May 31, 2024 12:22 PM
OS/Arch:             darwin/arm64
Profile:             local_sqlite
Server type:         ephemeral
Server:
  Database:          sqlite
  SQLite version:    3.43.2
```



Functions to edit:
src/prefect/cli/deploy.py:_run_single_deploy

Patch:
diff --git a/src/prefect/cli/deploy.py b/src/prefect/cli/deploy.py
index bef2ceea3ac5..13b6640bd0e4 100644
--- a/src/prefect/cli/deploy.py
+++ b/src/prefect/cli/deploy.py
@@ -40,7 +40,6 @@
     exit_with_error,
 )
 from prefect.cli.root import app, is_interactive
-from prefect.client.orchestration import ServerType
 from prefect.client.schemas.actions import DeploymentScheduleCreate
 from prefect.client.schemas.schedules import (
     CronSchedule,
@@ -615,17 +614,6 @@ async def _run_single_deploy(
         options.get("triggers"), deploy_config.get("triggers")
     ):
         triggers = _initialize_deployment_triggers(deployment_name, trigger_specs)
-        if client.server_type != ServerType.CLOUD:
-            app.console.print(
-                Panel(
-                    (
-                        "Deployment triggers are only supported on "
-                        "Prefect Cloud. Any triggers defined for the deployment will "
-                        "not be created."
-                    ),
-                ),
-                style="yellow",
-            )
     else:
         triggers = []
 

Test patch: diff --git a/tests/cli/test_deploy.py b/tests/cli/test_deploy.py
index 6844f4104769..440b5faf47e2 100644
--- a/tests/cli/test_deploy.py
+++ b/tests/cli/test_deploy.py
@@ -5403,46 +5403,6 @@ async def test_triggers_creation_orchestrated(
 
                 assert triggers == expected_triggers
 
-        async def test_deploy_command_warns_triggers_not_created_not_cloud(
-            self, project_dir, prefect_client, work_pool
-        ):
-            prefect_file = Path("prefect.yaml")
-            with prefect_file.open(mode="r") as f:
-                contents = yaml.safe_load(f)
-
-            contents["deployments"] = [
-                {
-                    "name": "test-name-1",
-                    "work_pool": {
-                        "name": work_pool.name,
-                    },
-                    "triggers": [
-                        {
-                            "enabled": True,
-                            "match": {"prefect.resource.id": "prefect.flow-run.*"},
-                            "expect": ["prefect.flow-run.Completed"],
-                            "match_related": {
-                                "prefect.resource.name": "seed",
-                                "prefect.resource.role": "flow",
-                            },
-                        }
-                    ],
-                }
-            ]
-
-            with prefect_file.open(mode="w") as f:
-                yaml.safe_dump(contents, f)
-
-            # Deploy the deployment with a name
-            await run_sync_in_worker_thread(
-                invoke_and_assert,
-                command="deploy ./flows/hello.py:my_flow -n test-name-1",
-                expected_code=0,
-                expected_output_contains=[
-                    "Deployment triggers are only supported on Prefect Cloud"
-                ],
-            )
-
     class TestDeploymentTriggerPassedViaCLI:
         @pytest.mark.usefixtures("project_dir")
         async def test_json_string_trigger(self, docker_work_pool):