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 new file mode 100644 index 0000000..e496c1c --- /dev/null +++ b/.github/workflows/pkgdown.yml @@ -0,0 +1,47 @@ +on: + push: + branches: [main] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + + steps: + - uses: actions/checkout@v4 + + - 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 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/.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* diff --git a/DESCRIPTION b/DESCRIPTION index 295646b..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 @@ -22,6 +24,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..e373afc --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,42 @@ +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 +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