Skip to content

Quarto Publish

Quarto Publish #23

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: "0 23 * * 0"
push:
branches: main
name: Quarto Publish
jobs:
build-deploy-renv:
if: ${{ always() && hashFiles('renv.lock') }}

Check failure on line 12 in .github/workflows/publish.yaml

View workflow run for this annotation

GitHub Actions / Quarto Publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yaml (Line: 12, Col: 9): Unrecognized function: 'hashFiles'. Located at position 13 within expression: always() && hashFiles('renv.lock') .github/workflows/publish.yaml (Line: 41, Col: 9): Unrecognized function: 'hashFiles'. Located at position 13 within expression: always() && hashFiles('renv.lock') == ''
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install R with renv
uses: r-lib/actions/setup-r@v2
with:
r-version: renv
- name: Install R Dependencies with renv
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-deploy-no-renv:
if: ${{ always() && hashFiles('renv.lock') == '' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ runner.tool_cache }}/R
key: ${{ runner.os }}-R-${{ hashFiles('**/*.lock') }}
restore-keys: |
${{ runner.os }}-R-
- name: Install R latest
uses: r-lib/actions/setup-r@v2
- name: Install R latest dependencies
run: |
install.packages("renv")
install.packages("rmarkdown")
install.packages("yaml")
install.packages(renv::dependencies()$Package)
shell: Rscript {0}
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check-renv:
runs-on: ubuntu-latest
outputs:
files: ${{ steps.check.outputs.files }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: List files
id: check
run: |
echo "::set-output name=files::$(ls)"