From 4cb84681a0440b3a79fa52ffdfe752c1f0ec180b Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 10 Sep 2024 13:16:41 +0100 Subject: [PATCH] Build and publish R docs alongside web app. #67 Based on https://github.com/acteng/netgen/blob/main/.github/workflows/pkgdown.yaml. Testing blindly by actually running in GH. --- .github/workflows/web.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 98115d8..6381237 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -33,6 +33,24 @@ jobs: npm run wasm npm run build --if-present + - 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 R docs + run: pkgdown::build_site_github_pages(pkg = "r", new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Copy R docs + run: mv docs web/dist/r/ + - name: Publish uses: peaceiris/actions-gh-pages@v3 with: