Skip to content

Commit

Permalink
Build only released pkgdown websites
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Aug 13, 2024
1 parent cbf3ea4 commit a8f1496
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 65 deletions.
45 changes: 26 additions & 19 deletions .github/workflows/render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,26 @@ on:
name: Build website

jobs:
configure:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.packages.outputs.matrix }}
steps:
- uses: actions/checkout@v4

- id: packages
run: echo "matrix=$(jq -c . < ./config.json)" >> $GITHUB_OUTPUT

pkgdown:
runs-on: ubuntu-latest
needs: configure
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
matrix:
config:
- {pkg: 'aion'}
- {pkg: 'alkahest'}
- {pkg: 'ananke'}
- {pkg: 'arkhe'}
- {pkg: 'dimensio'}
- {pkg: 'folio'}
- {pkg: 'isopleuros'}
- {pkg: 'kairos'}
- {pkg: 'khroma'}
- {pkg: 'kinesis'}
- {pkg: 'nexus'}
- {pkg: 'tabula'}
- {pkg: 'tekton'}
- {pkg: 'tesselle'}
steps:
- uses: actions/checkout@v4

Expand All @@ -41,17 +45,20 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, any::devtools, any::tekton
extra-packages: any::pkgdown, any::remotes, any::tekton

- name: Build site
- name: Build site (latest release)
run: |
git clone https://github.com/tesselle/${{ matrix.name }} tmp
Rscript -e 'devtools::install(pkg = "tmp", dependencies = TRUE)'
Rscript -e 'pkgdown::build_site_github_pages(pkg = "tmp", dest_dir = "docs")'
git clone https://github.com/tesselle/${{ matrix.config.pkg }} tmp
cd tmp/
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
Rscript -e 'remotes::install_deps(pkgdir = ".", dependencies = TRUE)'
Rscript -e 'utils::install.packages(pkgs = ".", repos = NULL)'
Rscript -e 'pkgdown::build_site_github_pages(pkg = ".", dest_dir = "docs")'
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
name: ${{ matrix.config.pkg }}
path: tmp/docs

quarto:
Expand Down Expand Up @@ -82,6 +89,6 @@ jobs:
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
clean: true
branch: gh-pages
folder: _site
46 changes: 0 additions & 46 deletions config.json

This file was deleted.

0 comments on commit a8f1496

Please sign in to comment.