Skip to content

use from documentation #354

use from documentation

use from documentation #354

Workflow file for this run

name: Production de la documentation
on:
push:
branches:
- main
- master
- renv
jobs:
docker:
if: "!contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
if: ${{ github.repository == 'inseefrlab/utilitr' }}
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
if: ${{ github.repository == 'inseefrlab/utilitr' }}
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: ${{ github.repository == 'inseefrlab/utilitr' }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
if: ${{ github.repository == 'inseefrlab/utilitr' }}
id: docker_build
uses: docker/build-push-action@v2
env:
GITHUB_PAT: ${{ secrets.PAT }}
with:
push: true
context: .
tags: |
inseefrlab/utilitr:latest
inseefrlab/utilitr:0.9.1
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
website:
name: Render website
if: "!contains(github.event.commits[0].message, '[skip ci]')"
needs: docker
runs-on: ubuntu-latest
container: inseefrlab/utilitr:latest
env:
RENV_PATHS_ROOT: ~/.cache/R/renv
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Configure safe repository
run: |
git config --global --add safe.directory /__w/utilitR/utilitR
- 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()
env:
GITHUB_PAT: ${{ secrets.PAT }}
- name: Render Book
run: |
ls
git remote -v
git config --global user.email quarto-github-actions-publish@example.com
git config --global user.name "Quarto GHA Workflow Runner"
quarto render --to html
quarto publish gh-pages --no-render --no-browser
- uses: actions/upload-artifact@v4
with:
name: _public
path: _public/
retention-days: 5