From 14fe693b6f24075e6107c62f35fa3230d46a7e15 Mon Sep 17 00:00:00 2001 From: craddm Date: Wed, 23 Oct 2024 23:05:35 +0100 Subject: [PATCH] use pkgdown github workflow --- .Rbuildignore | 1 + .github/workflows/pkgdown.yaml | 50 +++++++++ .gitignore | 1 + DESCRIPTION | 2 +- _pkgdown.yml | 188 ++++++++++++++++----------------- man/eegUtils-package.Rd | 1 + 6 files changed, 146 insertions(+), 97 deletions(-) create mode 100644 .github/workflows/pkgdown.yaml diff --git a/.Rbuildignore b/.Rbuildignore index a26ab983..d4cbc90f 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -16,3 +16,4 @@ ^\.github$ ^CITATION\.cff$ ^vignettes/single_subj_N170$ +^pkgdown$ diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 00000000..4bbce750 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,50 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +name: pkgdown.yaml + +permissions: read-all + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - 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: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index d9a23fdc..f01abdc3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ vignettes/linear_modelling/*.txt vignettes/single_subj_N170/*.set vignettes/single_subj_N170/*.fdt vignettes/single_subj_N170/*.set +docs diff --git a/DESCRIPTION b/DESCRIPTION index 49ba74d2..9ffe1eaf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -57,7 +57,7 @@ Suggests: mgcv, infomax (>= 0.1.0), Hmisc -URL: https://github.com/craddm/eegUtils, https://craddm.github.io/eegUtils +URL: https://github.com/craddm/eegUtils, https://craddm.github.io/eegUtils, https://craddm.github.io/eegUtils/ BugReports: https://github.com/craddm/eegUtils/issues Config/testthat/edition: 3 Config/testthat/parallel: true diff --git a/_pkgdown.yml b/_pkgdown.yml index df04c7c0..e88214bd 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,107 +1,103 @@ -url: http://craddm.github.io/eegUtils - +url: https://craddm.github.io/eegUtils/ development: mode: auto - template: bootstrap: 5 params: bootswatch: flatly - navbar: components: twitter: - icon: "fab fa-twitter fa-lg" + icon: fab fa-twitter fa-lg href: https://www.twitter.com/matt_craddock - reference: - - title: IO - desc: > - Functions for importing data or electrode information into R. - contents: - - starts_with("import") - - export_bva - - title: Processing - desc: > - Functions for pre-processing and processing data - contents: - - apply_ica - - compute_csd - - eeg_average - - eeg_combine - - eeg_decompose - - eeg_downsample - - eeg_filter - - eeg_reference - - electrode_locations - - epoch_data - - interp_elecs - - rm_baseline - - run_ICA - - tag_events - - title: Artefact rejection - desc: > - Functions for artefact rejection. - contents: - - starts_with("ar") - - epoch_stats - - channel_stats - - view_artefacts - - title: Selection - desc: Functions for selecting subsets of data - contents: - - starts_with("select") - - filter - - title: Plotting - desc: > - Functions for plotting data - contents: - - browse_data - - erp_image - - erp_raster - - erp_scalp - - geom_topo - - get_scalpmap - - interactive_scalp - - starts_with("plot_") - - stat_scalpmap - - stat_scalpcontours - - topoplot - - view_ica - - title: Frequency analysis - desc: Functions related to (time-)frequency analysis - contents: - - compute_itc - - compute_psd - - compute_tfr - - title: Converters - desc: Functions for converting objects to data.frames - contents: - - starts_with("as.") - - title: Accessors - desc: Functions for accessing and modifying specific elements of an object - contents: - - channels - - epochs - - events - - channel_names - - get_participant_id - - get_recording - - title: internal - contents: - - starts_with("print") - - starts_with("is") - - epoch_data.default - - tag_epochs - - demo_epochs - - demo_spatial - - eeg_epochs - - eeg_ICA - - cycle_calc - - tag_epochs - - rotate_angle - - list_epochs - - list_events - - fit_glm - - eegUtils-package - - eeg_summarise +- title: IO + desc: | + Functions for importing data or electrode information into R. + contents: + - starts_with("import") + - export_bva +- title: Processing + desc: | + Functions for pre-processing and processing data + contents: + - apply_ica + - compute_csd + - eeg_average + - eeg_combine + - eeg_decompose + - eeg_downsample + - eeg_filter + - eeg_reference + - electrode_locations + - epoch_data + - interp_elecs + - rm_baseline + - run_ICA + - tag_events +- title: Artefact rejection + desc: | + Functions for artefact rejection. + contents: + - starts_with("ar") + - epoch_stats + - channel_stats + - view_artefacts +- title: Selection + desc: Functions for selecting subsets of data + contents: + - starts_with("select") + - filter +- title: Plotting + desc: | + Functions for plotting data + contents: + - browse_data + - erp_image + - erp_raster + - erp_scalp + - geom_topo + - get_scalpmap + - interactive_scalp + - starts_with("plot_") + - stat_scalpmap + - stat_scalpcontours + - topoplot + - view_ica +- title: Frequency analysis + desc: Functions related to (time-)frequency analysis + contents: + - compute_itc + - compute_psd + - compute_tfr +- title: Converters + desc: Functions for converting objects to data.frames + contents: starts_with("as.") +- title: Accessors + desc: Functions for accessing and modifying specific elements of an object + contents: + - channels + - epochs + - events + - channel_names + - get_participant_id + - get_recording +- title: internal + contents: + - starts_with("print") + - starts_with("is") + - epoch_data.default + - tag_epochs + - demo_epochs + - demo_spatial + - eeg_epochs + - eeg_ICA + - cycle_calc + - tag_epochs + - rotate_angle + - list_epochs + - list_events + - fit_glm + - eegUtils-package + - eeg_summarise + diff --git a/man/eegUtils-package.Rd b/man/eegUtils-package.Rd index 6e845566..7d67821f 100644 --- a/man/eegUtils-package.Rd +++ b/man/eegUtils-package.Rd @@ -13,6 +13,7 @@ Useful links: \itemize{ \item \url{https://github.com/craddm/eegUtils} \item \url{https://craddm.github.io/eegUtils} + \item \url{https://craddm.github.io/eegUtils/} \item Report bugs at \url{https://github.com/craddm/eegUtils/issues} }