Skip to content

Commit

Permalink
Move pkgdown building and deployment to GH action (#802)
Browse files Browse the repository at this point in the history
Automatically build and deploy pkgdown website via GH actions. New
`pkgdown.yaml` CI workflow to build and deploy on commit to `main` or a
GH release. Deployment occurs via a new `gh-pages` branch

Also, remove the existing pkgdown website from the `main` branch, and
add the `docs/` directory to `.gitignore` to prevent it from being
re-checked in to `main`

[SC-62380](https://app.shortcut.com/tiledb-inc/story/62380)
resolves #798
  • Loading branch information
mojaveazure authored Jan 24, 2025
1 parent ae0674d commit 5f5a9d3
Show file tree
Hide file tree
Showing 549 changed files with 56 additions and 94,244 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
^codecov.yml
^notes.md
^pkgdown
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
46 changes: 46 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

permissions: read-all

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 }}
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: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
- name: Build vignettes
run: cd vignettes/ && make
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
- name: Deploy to GitHub pages
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
TileDB-R.Rproj
# Example code in package build process
*-Ex.R
# pkgdown artifacts
docs/
# Build artifacts
src/*.o
src/*/*.o
src/*.so
src/*.dll
inst/lib/*/*.dll
inst/tiledb
# Output files from R CMD build
/*.tar.gz
# Output files from R CMD check
Expand Down
Empty file removed docs/.nojekyll
Empty file.
97 changes: 0 additions & 97 deletions docs/404.html

This file was deleted.

71 changes: 0 additions & 71 deletions docs/LICENSE-text.html

This file was deleted.

Binary file removed docs/apple-touch-icon-120x120.png
Binary file not shown.
Binary file removed docs/apple-touch-icon-152x152.png
Binary file not shown.
Binary file removed docs/apple-touch-icon-180x180.png
Binary file not shown.
Binary file removed docs/apple-touch-icon-60x60.png
Binary file not shown.
Binary file removed docs/apple-touch-icon-76x76.png
Binary file not shown.
Binary file removed docs/apple-touch-icon.png
Binary file not shown.
Loading

0 comments on commit 5f5a9d3

Please sign in to comment.