From 32351dbae8b7cc41393a166371fd9ff77a41a004 Mon Sep 17 00:00:00 2001 From: Jules Bertrand <33326907+julesbertrand@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:56:24 +0100 Subject: [PATCH] ci: fix deploy docs workflow trigger (#156) --- .github/workflows/deploy_docs.yaml | 7 ++++--- docs/CLI_REFERENCE.md | 1 + templates/.release_notes.md.j2 | 9 +++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 templates/.release_notes.md.j2 diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index 0f703e2..1924aaf 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -1,9 +1,10 @@ name: Deploy doc to GitHub Pages on: - push: - branches: - - 'main' + release: + types: + - published + workflow_dispatch: env: python-version: "3.10" diff --git a/docs/CLI_REFERENCE.md b/docs/CLI_REFERENCE.md index ceb88ec..79c0cce 100644 --- a/docs/CLI_REFERENCE.md +++ b/docs/CLI_REFERENCE.md @@ -52,6 +52,7 @@ $ vertex-deployer check [OPTIONS] PIPELINE_NAMES... * `PIPELINE_NAMES...`: The names of the pipeline to create. [optional] **Options**: + * `--all, -a / --no-all`: Whether to check all pipelines. [default: no-all] * `--config-filepath, -cfp PATH`: Path to the json/py file with parameter values and input artifacts to check. If not specified, all config files in the pipeline dir will be checked. * `--warn-defaults, -wd / --no-warn-defaults, -nwd`: Whether to warn when a default value is used and not overwritten in config file. [default: warn-defaults] diff --git a/templates/.release_notes.md.j2 b/templates/.release_notes.md.j2 new file mode 100644 index 0000000..243bf0b --- /dev/null +++ b/templates/.release_notes.md.j2 @@ -0,0 +1,9 @@ +## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }}) +{% for type_, commits in release["elements"] | dictsort %} +{% if type_ == "enh" %} +### {{ "Enhancements" | capitalize }} +{% else %} +### {{ type_ | capitalize }} +{% endif %}{%- if type_ != "unknown" %}{% for commit in commits %} +* {{ commit.descriptions[0] }} by {{commit.commit.author.name}} in [`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}) +{%- endfor %}{% endif %}{% endfor %}