Skip to content

fix R version

fix R version #28

name: biocbook
on:
push:
branches:
- devel
- RELEASE_**
jobs:
build-push:
runs-on: ubuntu-latest
name: Build and push Docker [${{ github.ref_name }}]
permissions:
contents: write
packages: write
steps:
- name: 🧾 Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: πŸ“ Get book info
id: info
run: |
echo pkgversion=$(grep -m1 -E '^Version: +' DESCRIPTION | sed -E 's/.*: +//') >> "${GITHUB_ENV}"
- name: πŸ” Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🏷 Get metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/${{ github.workflow }}
tags: |
type=raw,value=${{ env.pkgversion}},enable=true
type=raw,value=${{ github.ref_name }},enable=true
- name: πŸ‘· Build and push multi-arch Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
outputs: type=image,annotation-index.org.opencontainers.image.description=${{ github.workflow }}
build-args: |
BIOC_VERSION=${{ github.ref_name }}
render-deploy:
needs: build-push
runs-on: ubuntu-latest
name: Render and publish book [${{ github.ref_name }}]
container: ghcr.io/${{ github.repository_owner }}/${{ github.workflow }}:${{ github.ref_name }}
permissions:
contents: write
packages: read
steps:
- name: 🧾 Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: πŸ“¦ List installed packages
run: |
pkgs <- installed.packages()[,"Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: πŸ“š Install rsync
run: |
apt-get update && apt-get install -y rsync
- name: πŸ”§ Install quarto dependencies
run: |
quarto install tinytex
quarto check
# - name: πŸ”§ Install python dependencies
# uses: py-actions/py-dependency-install@v4
# with:
# path: "inst/assets/requirements.txt"
- name: πŸ–Œ Render book from versioned container
run: |
quarto render
- name: 🏷 Get gh-branch directory to deploy to
run: |
echo folder=$(echo ${{ github.ref_name }} | sed 's,RELEASE_,,' | tr '_' '.') >> "${GITHUB_ENV}"
- name: πŸš€ Deploy book to Github Pages on versioned branch
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
folder: docs/
target-folder: docs/${{ env.folder }}/
branch: gh-pages
clean: false