### 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.
alias_image(image_name, f"{dockerhub_repo}:{airflow_version}")
    
    time.sleep(10)
    if not skip_latest:
        get_console().print("[info]Replacing latest images with links to the newly created images.[/]")
        for python in python_versions:
            if slim_images:
                alias_image(
                    f"{dockerhub_repo}:slim-{airflow_version}-python{python}",
                    f"{dockerhub_repo}:slim-latest-python{python}",
                )
            else:
                alias_image(
                    f"{dockerhub_repo}:{airflow_version}-python{python}",
                    f"{dockerhub_repo}:latest-python{python}",
                )
        if python == DEFAULT_PYTHON_MAJOR_MINOR_VERSION:
            
            
            if slim_images:
                alias_image(
                    f"{dockerhub_repo}:slim-{airflow_version}",
                    f"{dockerhub_repo}:slim-latest",
                )
            else:
                alias_image(
                    f"{dockerhub_repo}:{airflow_version}",
                    f"{dockerhub_repo}:latest",
                )
def is_package_in_dist(dist_files: list[str], package: str) -> bool: