Quarto Publish #23
Workflow file for this run
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: | ||
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 GitHub Actions / Quarto PublishInvalid workflow file
|
||
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)" |