prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Doc deployment step failing
  The latest CI run failed to execute documentation deployment:
  https://app.circleci.com/pipelines/github/mne-tools/mne-bids-pipeline/3557/workflows/3458e5cc-c471-4664-8d0a-b0cc4961f9eb/jobs/41986/parallel-runs/0/steps/0-107
  
  ```shell
  #!/bin/bash -eo pipefail
  ./.circleci/setup_bash.sh
  CIRCLE_JOB=deploy_docs
  COMMIT_MESSAGE=68c63d6878992fb7c298f24420f1d349c6811079 MAINT: Use mike for doc deployment (#676)
  COMMIT_MESSAGE_ESCAPED=68c63d6878992fb7c298f24420f1d349c6811079 MAINT: Use mike for doc deployment (#676)
  CIRCLE_REQUESTED_JOB=
  Running job deploy_docs for main branch
  ./.circleci/setup_bash.sh: line 35: sudo: command not found
  
  Exited with code exit status 127
  CircleCI received exit code 127
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `docs/source/features/gen_steps.py`
  Content:
  ```
  1 #!/bin/env python
  2 """Generate steps.md."""
  3 
  4 import importlib
  5 from pathlib import Path
  6 from mne_bids_pipeline._config_utils import _get_step_modules
  7 
  8 pre = """\
  9 # Processing steps
  10 
  11 The following table provides a concise summary of each step in the Study
  12 Template. All steps exist in the `steps`/ directory.
  13 """
  14 
  15 step_modules = _get_step_modules()
  16 
  17 # Construct the lines of steps.md
  18 lines = [pre]
  19 for di, (dir_, modules) in enumerate(step_modules.items(), 1):
  20     if dir_ == 'all':
  21         continue  # this is an alias
  22     dir_module = importlib.import_module(f'mne_bids_pipeline.steps.{dir_}')
  23     dir_header = dir_module.__doc__.split('\n')[0].rstrip('.')
  24     dir_body = dir_module.__doc__.split('\n', maxsplit=1)
  25     if len(dir_body) > 1:
  26         dir_body = dir_body[1].strip()
  27     else:
  28         dir_body = ''
  29     lines.append(f'## {di}. {dir_header}\n')
  30     if dir_body:
  31         lines.append(f'{dir_body}\n')
  32     lines.append('| Processing step | Description |')
  33     lines.append('|:----------------|:------------|')
  34     # the "all" option
  35     dir_name, step_title = dir_, f'Run all {dir_header.lower()} steps.'
  36     lines.append(f'`{dir_name}` | {step_title} |')
  37     for module in modules:
  38         step_name = f'{dir_name}/{Path(module.__file__).name}'[:-3]
  39         step_title = module.__doc__.split('\n')[0]
  40         lines.append(f'`{step_name}` | {step_title} |')
  41     lines.append('')
  42 with open(Path(__file__).parent / 'steps.md', 'w') as fid:
  43     fid.write('\n'.join(lines))
  44
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/docs/source/features/gen_steps.py b/docs/source/features/gen_steps.py
  --- a/docs/source/features/gen_steps.py
  +++ b/docs/source/features/gen_steps.py
  @@ -12,6 +12,7 @@
   Template. All steps exist in the `steps`/ directory.
   """
   
  +print('Generating steps …')
   step_modules = _get_step_modules()
   
   # Construct the lines of steps.md
  
verification_info: {"golden_diff": "diff --git a/docs/source/features/gen_steps.py b/docs/source/features/gen_steps.py\n--- a/docs/source/features/gen_steps.py\n+++ b/docs/source/features/gen_steps.py\n@@ -12,6 +12,7 @@\n Template. All steps exist in the `steps`/ directory.\n \"\"\"\n \n+print('Generating steps \u2026')\n step_modules = _get_step_modules()\n \n # Construct the lines of steps.md\n", "issue": "Doc deployment step failing\nThe latest CI run failed to execute documentation deployment:\r\nhttps://app.circleci.com/pipelines/github/mne-tools/mne-bids-pipeline/3557/workflows/3458e5cc-c471-4664-8d0a-b0cc4961f9eb/jobs/41986/parallel-runs/0/steps/0-107\r\n\r\n```shell\r\n#!/bin/bash -eo pipefail\r\n./.circleci/setup_bash.sh\r\nCIRCLE_JOB=deploy_docs\r\nCOMMIT_MESSAGE=68c63d6878992fb7c298f24420f1d349c6811079 MAINT: Use mike for doc deployment (#676)\r\nCOMMIT_MESSAGE_ESCAPED=68c63d6878992fb7c298f24420f1d349c6811079 MAINT: Use mike for doc deployment (#676)\r\nCIRCLE_REQUESTED_JOB=\r\nRunning job deploy_docs for main branch\r\n./.circleci/setup_bash.sh: line 35: sudo: command not found\r\n\r\nExited with code exit status 127\r\nCircleCI received exit code 127\r\n```\n", "before_files": [{"content": "#!/bin/env python\n\"\"\"Generate steps.md.\"\"\"\n\nimport importlib\nfrom pathlib import Path\nfrom mne_bids_pipeline._config_utils import _get_step_modules\n\npre = \"\"\"\\\n# Processing steps\n\nThe following table provides a concise summary of each step in the Study\nTemplate. All steps exist in the `steps`/ directory.\n\"\"\"\n\nstep_modules = _get_step_modules()\n\n# Construct the lines of steps.md\nlines = [pre]\nfor di, (dir_, modules) in enumerate(step_modules.items(), 1):\n    if dir_ == 'all':\n        continue  # this is an alias\n    dir_module = importlib.import_module(f'mne_bids_pipeline.steps.{dir_}')\n    dir_header = dir_module.__doc__.split('\\n')[0].rstrip('.')\n    dir_body = dir_module.__doc__.split('\\n', maxsplit=1)\n    if len(dir_body) > 1:\n        dir_body = dir_body[1].strip()\n    else:\n        dir_body = ''\n    lines.append(f'## {di}. {dir_header}\\n')\n    if dir_body:\n        lines.append(f'{dir_body}\\n')\n    lines.append('| Processing step | Description |')\n    lines.append('|:----------------|:------------|')\n    # the \"all\" option\n    dir_name, step_title = dir_, f'Run all {dir_header.lower()} steps.'\n    lines.append(f'`{dir_name}` | {step_title} |')\n    for module in modules:\n        step_name = f'{dir_name}/{Path(module.__file__).name}'[:-3]\n        step_title = module.__doc__.split('\\n')[0]\n        lines.append(f'`{step_name}` | {step_title} |')\n    lines.append('')\nwith open(Path(__file__).parent / 'steps.md', 'w') as fid:\n    fid.write('\\n'.join(lines))\n", "path": "docs/source/features/gen_steps.py"}], "after_files": [{"content": "#!/bin/env python\n\"\"\"Generate steps.md.\"\"\"\n\nimport importlib\nfrom pathlib import Path\nfrom mne_bids_pipeline._config_utils import _get_step_modules\n\npre = \"\"\"\\\n# Processing steps\n\nThe following table provides a concise summary of each step in the Study\nTemplate. All steps exist in the `steps`/ directory.\n\"\"\"\n\nprint('Generating steps \u2026')\nstep_modules = _get_step_modules()\n\n# Construct the lines of steps.md\nlines = [pre]\nfor di, (dir_, modules) in enumerate(step_modules.items(), 1):\n    if dir_ == 'all':\n        continue  # this is an alias\n    dir_module = importlib.import_module(f'mne_bids_pipeline.steps.{dir_}')\n    dir_header = dir_module.__doc__.split('\\n')[0].rstrip('.')\n    dir_body = dir_module.__doc__.split('\\n', maxsplit=1)\n    if len(dir_body) > 1:\n        dir_body = dir_body[1].strip()\n    else:\n        dir_body = ''\n    lines.append(f'## {di}. {dir_header}\\n')\n    if dir_body:\n        lines.append(f'{dir_body}\\n')\n    lines.append('| Processing step | Description |')\n    lines.append('|:----------------|:------------|')\n    # the \"all\" option\n    dir_name, step_title = dir_, f'Run all {dir_header.lower()} steps.'\n    lines.append(f'`{dir_name}` | {step_title} |')\n    for module in modules:\n        step_name = f'{dir_name}/{Path(module.__file__).name}'[:-3]\n        step_title = module.__doc__.split('\\n')[0]\n        lines.append(f'`{step_name}` | {step_title} |')\n    lines.append('')\nwith open(Path(__file__).parent / 'steps.md', 'w') as fid:\n    fid.write('\\n'.join(lines))\n", "path": "docs/source/features/gen_steps.py"}]}