Improve documentation #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# READ-ONLY FILE | |
# | |
# Original file resides in r-hyperspec/pkg-skelton. | |
# DO NOT EDIT in any other repo as these changes will be overwritten. | |
# Edit at r-hyperspec/pkg-skelton, then push there and | |
# this file will be deployed to the other repos. | |
# | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main, master, develop, release, auto-update-test] | |
release: | |
types: [published] | |
name: Website (pkgdown) | |
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 }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
use-public-rspm: true | |
extra-repositories: "https://r-hyperspec.github.io/pkg-repo/" | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::pkgdown, any::devtools, local::. | |
needs: website | |
- name: "Install roxygen2==7.2.3" | |
run: | | |
remotes::install_version("roxygen2", "7.2.3") | |
shell: Rscript {0} | |
- name: Roxygenize | |
# The vignettes will be built in the next steps | |
run: | | |
devtools::document(roclets = c('rd', 'collate', 'namespace')) | |
shell: Rscript {0} | |
- name: Build site | |
run: pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE) | |
shell: Rscript {0} | |
- name: Deploy to GitHub pages 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
clean: false | |
branch: gh-pages | |
folder: docs |