From dbfbd54447845cec3cc4eb7985124f08548ea39c Mon Sep 17 00:00:00 2001 From: Michael Walshe <62556482+michaelwalshe@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:47:33 +0100 Subject: [PATCH 1/4] Update index.qmd - remove hard links to psaims github pages site, make links relative --- index.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.qmd b/index.qmd index c6fdf96c6..24de8565e 100644 --- a/index.qmd +++ b/index.qmd @@ -26,7 +26,7 @@ method_tbl <- read_csv("data/stat_method_tbl.csv", show_col_types = FALSE) |> mutate(link_name = str_extract(value, "(?<=^\\[).*(?=\\])"), link_loc = str_extract(value, "(?<=\\().*(?=\\)$)"), link = if_else(!is.na(value), - paste0('', link_name, From 3ccb0396f100140a149f12b0dac6c0e10eab7e3a Mon Sep 17 00:00:00 2001 From: Michael Walshe <62556482+michaelwalshe@users.noreply.github.com> Date: Fri, 11 Apr 2025 10:23:53 +0100 Subject: [PATCH 2/4] Update pull_request_action.yml --- .github/workflows/pull_request_action.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_action.yml b/.github/workflows/pull_request_action.yml index 29a0660a7..715cb99da 100644 --- a/.github/workflows/pull_request_action.yml +++ b/.github/workflows/pull_request_action.yml @@ -1,5 +1,10 @@ on: pull_request: + types: + - opened + - reopened + - synchronize + - closed branches: main name: Test Rendering @@ -50,4 +55,9 @@ jobs: - name: Build site 🔧 run: | quarto render - \ No newline at end of file + + - name: Deploy preview 🔍 + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./_site/ + From 8be82c81641ae830fc75c5024dd2561e208829b0 Mon Sep 17 00:00:00 2001 From: Michael Walshe <62556482+michaelwalshe@users.noreply.github.com> Date: Fri, 11 Apr 2025 10:26:20 +0100 Subject: [PATCH 3/4] Update action.yml to allow for preview deployments --- .github/workflows/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index b8ea440ba..3ace2d421 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -53,4 +53,6 @@ jobs: with: branch: gh-pages # The branch the action should deploy to. folder: _site # The folder the action should deploy. - \ No newline at end of file + # Don't remove preview deployments + clean-exclude: pr-preview/ + force: false From d3fad99e3e834063e4b03c5272142b30217e69d3 Mon Sep 17 00:00:00 2001 From: Michael Walshe <62556482+michaelwalshe@users.noreply.github.com> Date: Fri, 11 Apr 2025 14:07:59 +0100 Subject: [PATCH 4/4] Ensure deploy only runs if we aren't on a fork, as otherwise it will fail with permissions errors --- .github/workflows/pull_request_action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull_request_action.yml b/.github/workflows/pull_request_action.yml index 715cb99da..f763c35f7 100644 --- a/.github/workflows/pull_request_action.yml +++ b/.github/workflows/pull_request_action.yml @@ -57,6 +57,8 @@ jobs: quarto render - name: Deploy preview 🔍 + # Ensure this step only runs if we aren't on a fork, as otherwise it will fail with permissions errors + if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }} uses: rossjrw/pr-preview-action@v1 with: source-dir: ./_site/