From fbd34fe926fa6c2fa4855a47ab722f12160b2b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20S=C3=B8rensen?= Date: Mon, 19 Jan 2026 14:22:26 +0100 Subject: [PATCH 1/4] adding aider to gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f1fbdaa..c4da473 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .Rhistory .RData .Ruserdata -parameter_trace \ No newline at end of file +parameter_trace +.aider* From 21b8cbf36f1259d974481ef19481738ccd1320cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20S=C3=B8rensen?= Date: Mon, 19 Jan 2026 14:49:26 +0100 Subject: [PATCH 2/4] docs: Set up pkgdown website with automated GitHub Pages deployment Co-authored-by: aider (gemini/gemini-2.5-pro) --- .github/workflows/pkgdown.yml | 31 +++++++++++++++++++++++++++++++ DESCRIPTION | 1 + _pkgdown.yml | 22 ++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .github/workflows/pkgdown.yml create mode 100644 _pkgdown.yml diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml new file mode 100644 index 0000000..65ea67f --- /dev/null +++ b/.github/workflows/pkgdown.yml @@ -0,0 +1,31 @@ +on: + push: + branches: + - main + - master + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: pkgdown + + - name: Build and deploy site + run: pkgdown::build_site_github_pages() + shell: Rscript {0} diff --git a/DESCRIPTION b/DESCRIPTION index 295646b..72d2ee6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,6 +22,7 @@ Imports: Depends: R (>= 4.1.0) Suggests: + pkgdown (>= 2.0.0), testthat (>= 3.0.0), label.switching (>= 1.8) Config/testthat/edition: 3 diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..dcbfc79 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,22 @@ +url: https://oystein-sorensen.github.io/BayesMallowsSMC2 +template: + bootstrap: 5 + +navbar: + components: + reference: + text: Reference + href: reference/index.html + news: + text: Changelog + href: news/index.html + +reference: + - title: "Main function" + contents: + - compute_sequentially + - title: "Helper functions" + contents: + - set_hyperparameters + - set_smc_options + - precompute_topological_sorts From 4e67250a9347b9e55548077557b20375c6b8b4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20S=C3=B8rensen?= Date: Mon, 19 Jan 2026 14:49:33 +0100 Subject: [PATCH 3/4] (no commit message provided) Co-authored-by: aider (gemini/gemini-2.5-pro) --- DESCRIPTION | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index 72d2ee6..2bacc78 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -9,6 +9,8 @@ Authors@R: c(person("Oystein", "Sorensen", Maintainer: Oystein Sorensen Description: Nested sequential Monte Carlo algorithms for the Bayesian Mallows model. +URL: https://github.com/oystein-sorensen/BayesMallowsSMC2 +BugReports: https://github.com/oystein-sorensen/BayesMallowsSMC2/issues License: GPL-3 Encoding: UTF-8 LazyData: true From a65c62931a908bd34054912563788f01f0549370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20S=C3=B8rensen?= Date: Mon, 19 Jan 2026 19:07:45 +0100 Subject: [PATCH 4/4] ci: Migrate pkgdown site deployment to GitHub Pages workflow Co-authored-by: aider (gemini/gemini-2.5-pro) --- .Rbuildignore | 2 ++ .github/workflows/pkgdown.yml | 34 +++++++++++++++++++++++++--------- _pkgdown.yml | 20 ++++++++++++++++++++ 3 files changed, 47 insertions(+), 9 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index d403b5a..544a026 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,3 +4,5 @@ ^data-raw$ ^dev$ ^\.github$ +^_pkgdown\.yml$ +^docs/ diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml index 65ea67f..e496c1c 100644 --- a/.github/workflows/pkgdown.yml +++ b/.github/workflows/pkgdown.yml @@ -1,8 +1,6 @@ on: push: - branches: - - main - - master + branches: [main] workflow_dispatch: name: pkgdown @@ -10,12 +8,13 @@ name: pkgdown jobs: pkgdown: runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} permissions: - contents: write + contents: read + pages: write + id-token: write + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 with: @@ -26,6 +25,23 @@ jobs: extra-packages: any::pkgdown, local::. needs: pkgdown - - name: Build and deploy site - run: pkgdown::build_site_github_pages() + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs + + deploy: + needs: pkgdown + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/_pkgdown.yml b/_pkgdown.yml index dcbfc79..e373afc 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -20,3 +20,23 @@ reference: - set_hyperparameters - set_smc_options - precompute_topological_sorts +url: https://oystein-sorensen.github.io/BayesMallowsSMC2 +template: + bootstrap: 5 + bootswatch: cosmo + +home: + sidebar: + structure: [links, license, community, citation, authors, dev] + +navbar: + structure: + left: [reference, news] + right: [github] + components: + reference: + text: Reference + href: reference/index.html + news: + text: Changelog + href: news/index.html