# ask-community

Johannes Müller

05/31/2023, 11:50 AM
What is the best practice for loading the latest dbt project from a git repository? I currently load the asset like this, but have to make sure manually that it is the latest version. The asset file is only executed when it is loaded, so just updating it before loading the asset would not be enough, right?
Copy code
# Updating the git repository here is not enough.
dbt_asset = with_resources(
    load_assets_from_dbt_project(DBT_PROJECT_PATH, profiles_dir=DBT_PROFILES),
    {"dbt": dbt_cli_resource.configured({"project_dir": DBT_PROJECT_PATH})},
Oh, I guess you are supposed to update it as part of your CI/CD pipeline?

Tim Castillo

05/31/2023, 4:36 PM
Hi! Yes, the best practice is to pull the repo or build the manifest during your CD step when you deploy your Dagster project.

Johannes Müller

06/01/2023, 6:02 AM
That sounds like a great solution, thanks!
Could you share a code snippet on how to load the github repository at definition time?
I am running into some issues there since the module seems to be loaded multiple times.