Skip to content

revert: apt caching for R installation dependency #143

revert: apt caching for R installation dependency

revert: apt caching for R installation dependency #143

Workflow file for this run

on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
#actions: write
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: apt update
run: sudo DEBIAN_FRONTEND=noninteractive apt-get update -y -qq
- name: Install ubuntu dependencies
#run: sudo apt install -y libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libudunits2-dev libgdal-dev
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >-
libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev
libudunits2-dev libgdal-dev
#execute_install_scripts: true
version: 1
- name: testing apt cache
run: gdal-config --version
- name: Install mamba environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: pyenv/base/environment.yml
#init-shell: bash
cache-environment: true
cache-environment-key: ${{ runner.os }}-mamba-${{ env.CACHE_NUMBER }}-${{ hashFiles('pyenv/base/environment.yml') }}
- name: activate conda environment
run: |
eval "$(micromamba shell hook --shell bash)"
micromamba activate baseline
which python
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
Ncpus: '4'
- name: Install R dependency
uses: r-lib/actions/setup-renv@v2
with:
profile: '"armyknives"'
#bypass-cache: never
#working-directory: "quarto/data/1_swiss_army_knives/"
cache-version: 2
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
#- name: Install quarto extension
#run: quarto install --no-prompt extension schochastics/academicons
- name: Quarto render - to inspect rendering cache
run: quarto render . --use-freezer
- name: Push Quarto render cache if diff detected
run: |
git config --global user.name 'YONGHUNI'
git config --global user.email '[email protected]'
git add _freeze
( git commit -m "[BOT]Quarto Freeze by GH actions" && git push ) || echo "Nothing to Push.. Skipping the Push Process"
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}