Skip to content

post(new): shinylive & quartolive #198

post(new): shinylive & quartolive

post(new): shinylive & quartolive #198

Workflow file for this run

on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
actions: write
pages: write
contents: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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 libarchive-dev libmagick++-dev
#execute_install_scripts: true
version: 1
- 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: 3
- name: "Setup pandoc"
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: latest
- run: |
which pandoc
pandoc --version
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
- run: sudo cp -f /opt/hostedtoolcache/pandoc/3.5/x64/pandoc /opt/quarto/bin/tools/
- name: check Quarto
run: |
(ls -lrt /opt/quarto/bin/tools/) || echo "chk dir"
(which R && which Rscript) || which Rscript || echo "check R path again"
Rscript -e '.libPaths()'
echo $R_LIBS_USER
Rscript -e 'library(shinylive)'
quarto check
(which quarto && quarto --version && quarto pandoc --version) || echo "no quarto detected"
# export PATH="/opt/R/4.4.1/bin:$PATH"
# export PATH="/usr/local/bin/:$PATH"
# echo $PATH
#- name: Install quarto extension
#run: quarto install --no-prompt extension schochastics/academicons
- name: Quarto render - to inspect rendering cache
run: quarto render ./posts/ --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 }}