Fix standing up the irods demo #192
Workflow file for this run
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
# 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, dev] | |
pull_request: | |
branches: [main, dev] | |
release: | |
types: [published] | |
workflow_dispatch: | |
name: 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 }} | |
R_KEEP_PKG_SOURCE: yes | |
RENV_PATHS_ROOT: ~/.local/share/renv | |
permissions: | |
contents: write | |
steps: | |
- name: rirods | |
uses: actions/checkout@v3 | |
- name: Setup iRODS demo | |
run: | | |
cd ./inst/irods_demo | |
git submodule sync --recursive | |
git submodule update --init --force --recursive --remote | |
docker compose up -d nginx-reverse-proxy irods-client-http-api irods-client-icommands | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev | |
- name: Cache packages | |
uses: actions/cache@v1 | |
with: | |
path: ${{ env.RENV_PATHS_ROOT }} | |
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-renv- | |
- name: Restore packages | |
shell: Rscript {0} | |
run: | | |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv") | |
renv::restore(repos = c(CRAN = "https://cloud.r-project.org")) | |
if (!requireNamespace("pkgdown", quietly = TRUE)) install.packages("pkgdown") | |
if (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools") | |
if (!requireNamespace("knitr", quietly = TRUE)) install.packages("knitr") | |
if (!requireNamespace("rmarkdown", quietly = TRUE)) install.packages("rmarkdown") | |
if (!requireNamespace("httptest2", quietly = TRUE)) install.packages("httptest2") | |
if (!requireNamespace("purrr", quietly = TRUE)) install.packages("purrr") | |
if (!requireNamespace("kableExtra", quietly = TRUE)) install.packages("kableExtra") | |
devtools::load_all(".") | |
source("pkgdown/pre-reference.R") | |
devtools::install() | |
Sys.setenv(R_USER_CONFIG_DIR = tempdir()) | |
- 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/[email protected] | |
with: | |
clean: false | |
branch: gh-pages | |
folder: docs |