### Body

Same as https://github.com/apache/airflow/issues/33876 but for `publish-docs` command.

### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
package_format: str,
    version_suffix_for_pypi: str,
    package_list_file: IO,
    debug: bool,
    packages: tuple[str, ...],
    github_repository: str,
):
    perform_environment_checks()
    cleanup_python_generated_files()
    packages_list = list(packages)
    suspended_provider_ids = get_suspended_provider_ids()
    if package_list_file:
        packages_list.extend(
            [
                package.strip()
                for package in package_list_file.readlines()
                if package.strip() not in suspended_provider_ids
            ]
        )
    shell_params = ShellParams(
        mount_sources=MOUNT_ALL,
        github_repository=github_repository,
        python=DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
        package_format=package_format,
        skip_environment_initialization=True,
        version_suffix_for_pypi=version_suffix_for_pypi,
    )
    rebuild_or_pull_ci_image_if_needed(command_params=shell_params)