Repository: PrefectHQ/prefect

Issue:
Prefect deploy shouldn't prompt for remote storage when git pull step exists
### 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

Running `prefect deploy` prompts the user to configure a remote storage location even when a `git_clone` pull step is configured. We should not prompt [here](https://github.com/PrefectHQ/prefect/blob/8f75e225284dfcb376b86dcfbb2c2a5f6e3a565f/src/prefect/cli/deploy.py#L542-L559) when a `git_clone` pull step is configured.

### Reproduction

```python3
# Welcome to your prefect.yaml file! You can use this file for storing and managing
# configuration for deploying your flows. We recommend committing this file to source
# control along with your flow code.

# Generic metadata about this project
name: prefect-hello
prefect-version: 2.13.5

# build section allows you to manage and build docker images
build: null

# push section allows you to manage if and how this project is uploaded to remote locations
push: null

# pull section allows you to provide instructions for cloning this project in remote locations
pull:
- prefect.deployments.steps.git_clone:
    repository: git@github.com:EmilRex/prefect-hello.git
    branch: main

# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: default
  version: null
  tags: []
  description: null
  entrypoint: flows/flow.py:hello
  parameters: {}
  work_pool:
    name: process-pool
    work_queue_name: null
    job_variables: {}
  schedule: null
```


### Error

```python3
prefect deploy -n hello/default
? Your Prefect workers will need access to this flow's code in order to run it. Would you like your workers to pull your 
flow code from a remote storage location when running this flow? [y/n] (y):
```


### Versions

```Text
Version:             2.13.5
API version:         0.8.4
Python version:      3.9.18
Git commit:          0fe4277b
Built:               Thu, Oct 5, 2023 3:58 PM
OS/Arch:             darwin/arm64
Profile:             personal
Server type:         cloud
```


### Additional context

_No response_


Discussion:
I'm seeing this too.
ok I am seeing this as well - working on this now!

Resolving patch:
diff --git a/src/prefect/cli/deploy.py b/src/prefect/cli/deploy.py
--- a/src/prefect/cli/deploy.py
+++ b/src/prefect/cli/deploy.py
@@ -542,7 +542,7 @@ async def _run_single_deploy(
     if (
         is_interactive()
         and not ci
-        and not deploy_config.get("pull")
+        and not (deploy_config.get("pull") or actions.get("pull"))
         and not docker_push_step_exists
         and confirm(
             (


Test patch:
diff --git a/tests/cli/test_deploy.py b/tests/cli/test_deploy.py
--- a/tests/cli/test_deploy.py
+++ b/tests/cli/test_deploy.py
@@ -733,6 +733,39 @@ async def test_project_deploy_with_no_prefect_yaml(self, project_dir, work_pool)
             ],
         )
 
+    async def test_deploy_does_not_prompt_storage_when_pull_step_exists(
+        self, project_dir, work_pool, interactive_console
+    ):
+        # write a pull step to the prefect.yaml
+        with open("prefect.yaml", "r") as f:
+            config = yaml.safe_load(f)
+
+        config["pull"] = [
+            {"prefect.deployments.steps.set_working_directory": {"directory": "."}}
+        ]
+
+        with open("prefect.yaml", "w") as f:
+            yaml.safe_dump(config, f)
+
+        await run_sync_in_worker_thread(
+            invoke_and_assert,
+            command=(
+                "deploy ./flows/hello.py:my_flow -n test-name -p"
+                f" {work_pool.name} --version 1.0.0 -v env=prod -t foo-bar"
+                " --interval 60"
+            ),
+            user_input=(
+                # don't save the deployment configuration
+                "n"
+                + readchar.key.ENTER
+            ),
+            expected_code=0,
+            expected_output_does_not_contain=[
+                "Would you like your workers to pull your flow code from a remote"
+                " storage location when running this flow?"
+            ],
+        )
+
     class TestGeneratedPullAction:
         async def test_project_deploy_generates_pull_action(
             self, work_pool, prefect_client, uninitialized_project_dir
@@ -3141,11 +3174,8 @@ async def test_deploy_without_name_in_prefect_yaml_interactive(
             command="deploy --all",
             expected_code=0,
             user_input=(
-                # decline remote storage
-                "n"
-                + readchar.key.ENTER
                 # reject saving configuration
-                + "n"
+                "n"
                 + readchar.key.ENTER
                 # accept naming deployment
                 + "y"
@@ -4248,9 +4278,6 @@ def test_save_user_inputs_existing_prefect_file(self):
                 # enter work pool name
                 "inflatable"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4300,9 +4327,6 @@ def test_save_user_inputs_with_interval_schedule(self):
                 # enter work pool name
                 "inflatable"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4358,9 +4382,6 @@ def test_save_user_inputs_with_cron_schedule(self):
                 # enter work pool name
                 "inflatable"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4415,9 +4436,6 @@ def test_deploy_existing_deployment_with_no_changes_does_not_prompt_save(self):
                 # enter work pool name
                 "inflatable"
                 + readchar.key.ENTER
-                # decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4506,9 +4524,6 @@ def test_deploy_existing_deployment_with_changes_prompts_save(self):
                 # enter work pool name
                 "inflatable"
                 + readchar.key.ENTER
-                # decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4537,11 +4552,8 @@ def test_deploy_existing_deployment_with_changes_prompts_save(self):
         invoke_and_assert(
             command="deploy -n existing-deployment --cron '* * * * *'",
             user_input=(
-                # decline remote storage
-                "n"
-                + readchar.key.ENTER
                 # accept create work pool
-                + readchar.key.ENTER
+                readchar.key.ENTER
                 # choose process work pool
                 + readchar.key.ENTER
                 +
@@ -4606,9 +4618,6 @@ def test_save_user_inputs_with_rrule_schedule(self):
                 # enter work pool name
                 "inflatable"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4763,9 +4772,6 @@ def test_save_user_inputs_overwrite_confirmed(self):
                 # enter work pool name
                 + "inflatable"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4808,9 +4814,6 @@ def test_save_user_inputs_overwrite_confirmed(self):
                 +
                 # accept create work pool
                 readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 +
                 # choose process work pool
                 readchar.key.ENTER
@@ -4861,9 +4864,6 @@ def test_save_user_inputs_overwrite_rejected_saving_cancelled(self):
                 # enter work pool name
                 "inflatable"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept save user inputs
                 + "y"
                 + readchar.key.ENTER
@@ -4902,9 +4902,6 @@ def test_save_user_inputs_overwrite_rejected_saving_cancelled(self):
                 + readchar.key.ENTER
                 # accept create work pool
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # choose process work pool
                 + readchar.key.ENTER
                 # enter work pool name
@@ -4977,9 +4974,6 @@ async def test_deploy_resolves_variables_in_deployments_section(
                 # reject schedule
                 "n"
                 + readchar.key.ENTER
-                # decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # accept saving configuration
                 + "y"
                 + readchar.key.ENTER
@@ -5786,9 +5780,6 @@ async def test_triggers_saved_to_prefect_yaml(self, docker_work_pool):
                         # Decline docker build
                         + "n"
                         + readchar.key.ENTER
-                        # Decline remote storage
-                        + "n"
-                        + readchar.key.ENTER
                         # Accept save configuration
                         + "y"
                         + readchar.key.ENTER
@@ -5893,9 +5884,6 @@ async def test_other_build_step_exists_prompts_build_custom_docker_image(
                 # Reject build custom docker image
                 "n"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # Accept save configuration
                 + "y"
                 + readchar.key.ENTER
@@ -5930,9 +5918,6 @@ async def test_no_build_step_exists_prompts_build_custom_docker_image(
                 # Reject build custom docker image
                 "n"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # Accept save configuration
                 + "y"
                 + readchar.key.ENTER
@@ -5986,9 +5971,6 @@ async def test_prompt_build_custom_docker_image_accepted_use_existing_dockerfile
                 # Reject push to registry
                 "n"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # Accept save configuration
                 + "y"
                 + readchar.key.ENTER
@@ -6061,9 +6043,6 @@ async def test_prompt_build_custom_docker_image_accepted_use_existing_dockerfile
                 # Reject push to registry
                 "n"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # Accept save configuration
                 + "y"
                 + readchar.key.ENTER
@@ -6159,9 +6138,6 @@ async def test_prompt_build_custom_docker_image_accepted_no_existing_dockerfile_
                 # Reject push to registry
                 + "n"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # Accept save configuration
                 + "y"
                 + readchar.key.ENTER
@@ -6430,9 +6406,6 @@ async def test_prompt_push_custom_docker_image_rejected(
                 # Reject push to registry
                 + "n"
                 + readchar.key.ENTER
-                # Decline remote storage
-                + "n"
-                + readchar.key.ENTER
                 # Accept save configuration
                 + "y"
                 + readchar.key.ENTER