From c09b7da9bc6e69940c23ee084481b5919b9df898 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 7 Mar 2024 10:47:12 +0800 Subject: [PATCH 1/6] chore: trigger readthedocs preview only when docs change --- .github/workflows/readthedocs-preview.yml | 2 ++ .../workflows/readthedocs-preview.yml.jinja | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/readthedocs-preview.yml b/.github/workflows/readthedocs-preview.yml index b0549406..8e832200 100644 --- a/.github/workflows/readthedocs-preview.yml +++ b/.github/workflows/readthedocs-preview.yml @@ -13,5 +13,7 @@ on: pull_request_target: types: - opened + paths: + - docs/** permissions: pull-requests: write diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja index 1090b991..25ac6afc 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja @@ -13,5 +13,7 @@ on: pull_request_target: types: - opened + paths: + - docs/** permissions: pull-requests: write From c1caf668e1fe061ff9385980cedc07eb577c3488 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 7 Mar 2024 10:50:51 +0800 Subject: [PATCH 2/6] fix --- .github/workflows/readthedocs-preview.yml | 2 +- .../workflows/readthedocs-preview.yml.jinja | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/readthedocs-preview.yml b/.github/workflows/readthedocs-preview.yml index 8e832200..0283abcf 100644 --- a/.github/workflows/readthedocs-preview.yml +++ b/.github/workflows/readthedocs-preview.yml @@ -14,6 +14,6 @@ on: types: - opened paths: - - docs/** + - 'docs/**' permissions: pull-requests: write diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja index 25ac6afc..02a3b030 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja @@ -14,6 +14,6 @@ on: types: - opened paths: - - docs/** + - 'docs/**' permissions: pull-requests: write From 6ef7fe2aee514d0a958207feb6ed4dbbca06417b Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 7 Mar 2024 16:21:46 +0800 Subject: [PATCH 3/6] add README.md in paths --- .github/workflows/readthedocs-preview.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/readthedocs-preview.yml b/.github/workflows/readthedocs-preview.yml index 0283abcf..11000311 100644 --- a/.github/workflows/readthedocs-preview.yml +++ b/.github/workflows/readthedocs-preview.yml @@ -14,6 +14,7 @@ on: types: - opened paths: - - 'docs/**' + - docs/** + - README.md permissions: pull-requests: write From dd49d14159706ec22c0c1dd50b36670ce3415452 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 7 Mar 2024 16:27:35 +0800 Subject: [PATCH 4/6] update template --- .../workflows/readthedocs-preview.yml.jinja | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja index 02a3b030..dc809e97 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja @@ -14,6 +14,7 @@ on: types: - opened paths: - - 'docs/**' + - docs/** + - README.md permissions: pull-requests: write From 477a4eb7cb84b601dd96cf036b0cd0a3c221b1df Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Mon, 11 Mar 2024 11:58:46 +0800 Subject: [PATCH 5/6] add `.readthedocs.yaml` --- .github/workflows/readthedocs-preview.yml | 1 + .../workflows/readthedocs-preview.yml.jinja | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/readthedocs-preview.yml b/.github/workflows/readthedocs-preview.yml index 11000311..a7574acb 100644 --- a/.github/workflows/readthedocs-preview.yml +++ b/.github/workflows/readthedocs-preview.yml @@ -16,5 +16,6 @@ on: paths: - docs/** - README.md + - .readthedocs.yaml permissions: pull-requests: write diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja index dc809e97..e1fabbb2 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja @@ -16,5 +16,6 @@ on: paths: - docs/** - README.md + - .readthedocs.yaml permissions: pull-requests: write From efe663c01d1b5316afbd24592bf2ed744b843fd9 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Mon, 11 Mar 2024 12:03:11 +0800 Subject: [PATCH 6/6] add `readthedocs-preview.yml` --- .github/workflows/readthedocs-preview.yml | 5 +++-- .../workflows/readthedocs-preview.yml.jinja | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/readthedocs-preview.yml b/.github/workflows/readthedocs-preview.yml index a7574acb..110b4887 100644 --- a/.github/workflows/readthedocs-preview.yml +++ b/.github/workflows/readthedocs-preview.yml @@ -14,8 +14,9 @@ on: types: - opened paths: - - docs/** - - README.md + - .github/workflows/readthedocs-preview.yml - .readthedocs.yaml + - README.md + - docs/** permissions: pull-requests: write diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja index e1fabbb2..3a4545f2 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/readthedocs-preview.yml.jinja @@ -14,8 +14,9 @@ on: types: - opened paths: - - docs/** - - README.md + - .github/workflows/readthedocs-preview.yml - .readthedocs.yaml + - README.md + - docs/** permissions: pull-requests: write