From 07a58ae98deeca68d907b63de726c9df9933f9bb Mon Sep 17 00:00:00 2001 From: chainsawriot Date: Mon, 25 Mar 2024 11:12:32 +0100 Subject: [PATCH] Add pkgdown --- .Rbuildignore | 4 ++++ .github/.gitignore | 1 + .github/workflows/pkgdown.yaml | 38 ++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ DESCRIPTION | 5 +++-- README.Rmd | 2 +- README.md | 2 +- _pkgdown.yml | 4 ++++ 8 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/pkgdown.yaml create mode 100644 .gitignore create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index 60ec3c2..15b4979 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,3 +6,7 @@ ^cran-comments\.md$ ^CRAN-SUBMISSION$ ^.gitattributes$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..4a915b8 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,38 @@ +on: + push: + branches: v* + pull_request: + branches: v* + release: + types: published + workflow_dispatch: ~ +name: pkgdown +jobs: + pkgdown: + runs-on: ubuntu-latest + 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: yes + - 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 \U0001F680" + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: no + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31d5365 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +inst/doc +docs diff --git a/DESCRIPTION b/DESCRIPTION index 3166a39..638e3e9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: grafzahl Title: Supervised Machine Learning for Textual Data Using Transformers and 'Quanteda' -Version: 0.0.9 +Version: 0.0.10 Authors@R: person("Chung-hong", "Chan", , "chainsawtiney@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6232-7530")) @@ -9,7 +9,7 @@ License: GPL (>= 3) Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.1 -URL: https://github.com/gesistsa/grafzahl +URL: https://gesistsa.github.io/grafzah, https://github.com/gesistsa/grafzahl BugReports: https://github.com/gesistsa/grafzahl/issues Suggests: knitr, @@ -29,3 +29,4 @@ LazyData: true Depends: R (>= 3.5) VignetteBuilder: knitr +Config/Needs/website: gesistsa/tsatemplate diff --git a/README.Rmd b/README.Rmd index 429c6d8..5a7037f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,7 +13,7 @@ knitr::opts_chunk$set( ) ``` -# grafzahl +# grafzahl [![CRAN status](https://www.r-pkg.org/badges/version/grafzahl)](https://CRAN.R-project.org/package=grafzahl) diff --git a/README.md b/README.md index ca5325f..08deed3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# grafzahl +# grafzahl diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..8b11afb --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: https://gesistsa.github.io/grafzahl/ +template: + package: tsatemplate +