From 487888d757bec1716fa05daf09be8bd65dba1362 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 18 Dec 2024 16:37:13 -0500 Subject: [PATCH] ci: add workflow to deploy pkgdown site --- .github/workflows/site.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/site.yaml diff --git a/.github/workflows/site.yaml b/.github/workflows/site.yaml new file mode 100644 index 00000000..b7a49e78 --- /dev/null +++ b/.github/workflows/site.yaml @@ -0,0 +1,31 @@ +name: Deploy site +on: + push: + branches: + - scratch/deploy-site + tags: + - '[0-9]+.[0-9]+.[0-9]+' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + # Fetch tags for more informative git-describe output. + fetch-depth: 0 + - uses: r-lib/actions/setup-pandoc@v2 + - uses: r-lib/actions/setup-r@v2 + with: + r-version: release + use-public-rspm: true + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown + - name: Build site + run: pkgdown::build_site_github_pages(dest_dir = "docs", install = TRUE) + shell: Rscript {0} + - uses: metrumresearchgroup/actions/subdir-to-gh-pages@v1