Publishing Docs based on Environment

Is there a way to specify in a script that runs the checkpoint to only create the data docs either locally or on S3? I see in my checkpoint that it says validation_operator_name: action_list_operator and that in the great_expectations.yml, it includes the following:

validation_operators:
  action_list_operator:
    # To learn how to configure sending Slack notifications during evaluation
    # (and other customizations), read: https://docs.greatexpectations.io/en/latest/reference/validation_operators/action_list_validation_operator.html
    class_name: ActionListValidationOperator
    action_list:
    - name: store_validation_result
      action:
        class_name: StoreValidationResultAction
    - name: store_evaluation_params
      action:
        class_name: StoreEvaluationParametersAction
    - name: update_data_docs
      action:
        class_name: UpdateDataDocsAction

But I’m not quite sure how to specify the UpdateDataDocsAction to be environment dependent. I don’t want users run GE locally to write to S3 and when running in production, I don’t need to access the uncommitted file to try to make local docs. Thank you in advance for any guidance/help.

Great Question! You can update your update_data_docs action to add a site_names key, along the lines of the following:

    ...
    - name: update_data_docs
      action:
        class_name: UpdateDataDocsAction
        site_names:
          - ${ACTIVE_SITE}

Then, you can set the ACTIVE_SITE variable to be the name of the site you’d like to build (like s3_site or local_site