undo quarto version increase #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main] | |
name: Render project | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
steps: | |
- name: install linux dependencies | |
run: | | |
sudo apt-get install libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: "4.3" | |
use-public-rspm: true | |
- name: Install system dependencies for igraph | |
run: sudo apt-get update && sudo apt-get install -y libglpk40 | |
- name: Set up environment | |
run: | | |
echo "LINUX_VERSION=$(uname -rs)" >> $GITHUB_ENV | |
- name: Cache Python packages | |
uses: actions/cache@v4 | |
with: | |
path: renv/python/virtualenvs/renv-python-3.10 | |
key: python-${{env.LINUX_VERSION}}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} | |
restore-keys: python-${{env.LINUX_VERSION}}-${{ env.pythonLocation }}- | |
- uses: r-lib/actions/setup-renv@v2 | |
- uses: viash-io/viash-actions/setup@v6 | |
- name: Install Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: 1.5.57 | |
- name: If PR, cache several directories | |
if: github.event_name == 'pull_request' | |
uses: actions/cache@v4 | |
with: | |
key: quarto-${{ github.ref_name }} | |
restore-keys: quarto | |
path: | | |
.quarto | |
_docs | |
_freeze | |
- name: Render with Quarto | |
shell: bash -l {0} | |
run: | | |
quarto render --profile evaluate_code | |
- name: Clean up | |
shell: bash -l {0} | |
run: | | |
rm -rf !("_docs") | |
rm .gitignore !("_docs") | |
rm -rf .quarto !("_docs") | |
rm .gitmodules !("_docs") | |
rm .renvignore !("_docs") | |
rm .Rprofile !("_docs") | |
rm -rf .github !("_docs") | |
mv _docs/* . | |
rm -rf _docs | |
- name: Deploy to target branch | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: "render/main" | |
publish_dir: . |