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 diff --git a/.github/workflows/pull_request_action.yml b/.github/workflows/pull_request_action.yml index 29a0660a7..f763c35f7 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,11 @@ jobs: - name: Build site 🔧 run: | quarto render - \ No newline at end of file + + - 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/ + 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,