Skip to content

Merge pull request #29 from ecohealthalliance/dev #10

Merge pull request #29 from ecohealthalliance/dev

Merge pull request #29 from ecohealthalliance/dev #10

Workflow file for this run

name: Quarto Publish
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
container: rocker/tidyverse:4.4.2
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
GIT_CRYPT_KEY64: ${{ secrets.GIT_CRYPT_KEY64 }}
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
git-crypt gh curl jq rsync
- name: Trust repo
run: |
git config --global --add safe.directory /__w/acdc-db-handbook/acdc-db-handbook
- name: Decrypt repository using symmetric key
run: |
echo $GIT_CRYPT_KEY64 > git_crypt_key.key64 && base64 -di git_crypt_key.key64 > git_crypt_key.key && git-crypt unlock git_crypt_key.key
rm git_crypt_key.key git_crypt_key.key64
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- name: Install packages from renv.lock (with cache)
if: ${{ !env.ACT }}
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 2
- name: Install packages from renv.lock (local, no cache)
if: ${{ env.ACT }}
run: |
renv::restore()
shell: Rscript {0}
- name: Render document
run: |
readRenviron(".env")
quarto::quarto_render("index.qmd")
shell: Rscript {0}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs