Skip to content

upding R installation/caching mechanism #336

upding R installation/caching mechanism

upding R installation/caching mechanism #336

Workflow file for this run

name: Website and Docker
on: [push, workflow_dispatch]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
job1:

Check failure on line 10 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yaml

Invalid workflow file

You have an error in your yaml syntax on line 10
runs-on: ubuntu-24.04
container: rocker/verse:latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: true
# System dependencies
- name: Install apt dependencies
run: |
apt-get update
apt-get -y upgrade
apt-get -y install rsync libv8-dev #for deploy and dagitty
curl -fsSL https://get.docker.com -o install-docker.sh
sh install-docker.sh
# Git submodule init fails with unsafe repository
- name: Add exception for /home/rstudio
run: git config --global --add safe.directory /home/rstudio
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ runner.tool_cache }}/R
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: |
${{ runner.os }}-r-
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check")
shell: Rscript {0}
- name: Build pkgdown
run: |
PATH=$PATH:$HOME/bin/ Rscript -e 'rmarkdown::render("README.Rmd", output_file = "README.md")'
PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site(".")'
- name: Update README.md
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'main'
commit-message: 'Update README.md'
force-add: 'true'
files: README.md session*
name: Levi's GitHub Robot
email: [email protected]
- name: Deploy ð
uses: JamesIves/github-pages-deploy-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
workspace: $GITHUB_WORKSPACE
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ env.IMAGE_NAME }}:latest
github-token: ${{ secrets.GITHUB_TOKEN}}