From ebf164961eb68313be17296b8a33e6b3aa31fe4a Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Thu, 19 Dec 2024 07:22:49 -0600 Subject: [PATCH 1/6] Update run condition for RTD and deduplicate runs. --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8db471ee..e3f30900 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,6 +2,7 @@ name: CI testing on: pull_request: + branches: [develop, alpha-test-dev] push: branches: [develop, main, alpha-test] @@ -156,6 +157,10 @@ jobs: name: Test all demo notebooks RTD-links: + on: + pull_request_target: + types: + -opened permissions: pull-requests: write runs-on: ubuntu-latest From 5a35494ca7f1b4477cbb4cd36271b2f665303224 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Thu, 19 Dec 2024 07:27:43 -0600 Subject: [PATCH 2/6] Moved RTD to own action. --- .github/workflows/main.yml | 13 ------------- .github/workflows/rtd_link.yml | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/rtd_link.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e3f30900..72e4c593 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -155,19 +155,6 @@ jobs: cd demo for file in *.ipynb; do papermill $file foo.ipynb; done name: Test all demo notebooks - - RTD-links: - on: - pull_request_target: - types: - -opened - permissions: - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: readthedocs/actions/preview@v1 - with: - project-slug: "montepy" format-test: runs-on: ubuntu-latest diff --git a/.github/workflows/rtd_link.yml b/.github/workflows/rtd_link.yml new file mode 100644 index 00000000..a65928ab --- /dev/null +++ b/.github/workflows/rtd_link.yml @@ -0,0 +1,17 @@ +name: add RTD links +on: + pull_request_target: + types: + - opened + # Execute this action only on PRs that touch + # documentation files. + # paths: + # - "docs/**" + + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: "montepy" From c3bb2ea8e2ba46fd8183f559dc243979fa570079 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 19 Dec 2024 07:35:00 -0600 Subject: [PATCH 3/6] Tried to fix action. --- .github/workflows/rtd_link.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rtd_link.yml b/.github/workflows/rtd_link.yml index a65928ab..7c0c13cc 100644 --- a/.github/workflows/rtd_link.yml +++ b/.github/workflows/rtd_link.yml @@ -1,17 +1,13 @@ name: add RTD links on: pull_request_target: - types: - - opened - # Execute this action only on PRs that touch - # documentation files. - # paths: - # - "docs/**" - - permissions: - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: readthedocs/actions/preview@v1 - with: - project-slug: "montepy" + types: [opened] +jobs: + add_rtd_link: + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: "montepy" From 79196f5c09741e26c2877c3cc8ed8191cd51fff4 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 19 Dec 2024 07:47:05 -0600 Subject: [PATCH 4/6] Expand trigger events --- .github/workflows/rtd_link.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rtd_link.yml b/.github/workflows/rtd_link.yml index 7c0c13cc..e56d1bee 100644 --- a/.github/workflows/rtd_link.yml +++ b/.github/workflows/rtd_link.yml @@ -1,7 +1,7 @@ name: add RTD links on: pull_request_target: - types: [opened] + types: [opened, edited] jobs: add_rtd_link: permissions: From 2737af24cb29d38c4d556098251c720d610c5826 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 19 Dec 2024 07:49:31 -0600 Subject: [PATCH 5/6] Testing expanding runner events --- .github/workflows/rtd_link.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rtd_link.yml b/.github/workflows/rtd_link.yml index e56d1bee..e217dd8c 100644 --- a/.github/workflows/rtd_link.yml +++ b/.github/workflows/rtd_link.yml @@ -1,7 +1,8 @@ name: add RTD links on: - pull_request_target: - types: [opened, edited] + pull_request: + # pull_request_target: + # types: [opened, edited] jobs: add_rtd_link: permissions: From 37a8154e421afb62c2e90c280cf6ca6f6a6c5d18 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 19 Dec 2024 07:51:16 -0600 Subject: [PATCH 6/6] Restricted actions --- .github/workflows/rtd_link.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/rtd_link.yml b/.github/workflows/rtd_link.yml index e217dd8c..4ca44b54 100644 --- a/.github/workflows/rtd_link.yml +++ b/.github/workflows/rtd_link.yml @@ -1,8 +1,7 @@ name: add RTD links on: pull_request: - # pull_request_target: - # types: [opened, edited] + types: [opened, reopened, edited] jobs: add_rtd_link: permissions: