Skip to content

Commit

Permalink
.github: Separate GH pages build for release/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lentinj committed Jul 17, 2024
1 parent bbc44b8 commit ec6b96f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/gh-pages-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Based on:-
# * https://ropenscilabs.github.io/actions_sandbox/websites-using-pkgdown-bookdown-and-blogdown.html#action-to-deploy-a-bookdown-site
# * https://github.com/peaceiris/actions-gh-pages
on:
push:
branches:
- gh_pages_test

name: Render development documentation

jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-pandoc@v2

- 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}
env:
PKGDOWN_DEV_MODE: devel

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./docs/dev
destination_dir: ./${{ github.ref_name }}
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# * https://github.com/peaceiris/actions-gh-pages
on:
push:
branches:
- master
tags:
- 'v*'

name: Render documentation
name: Render release documentation

jobs:
documentation:
Expand Down

0 comments on commit ec6b96f

Please sign in to comment.