Skip to content

docs: update rendering instructions #170

docs: update rendering instructions

docs: update rendering instructions #170

Workflow file for this run

on:
workflow_dispatch:
push:
branches: main
pull_request:
branches: main
name: Render and Publish
jobs:
build-deploy:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
posit-dev/r-shinylive
any::knitr
any::rmarkdown
any::downlit
any::xml2
any::shinyMobile
cache-version: 2
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
- name: Restore lychee cache
id: restore-cache
uses: actions/cache/restore@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
with:
fail: true
args: "docs --exclude-loopback --insecure --exclude-mail --exclude-path docs/site_libs --cache --max-cache-age 1d"
- name: Read lychee's out.md
if: failure()
id: lychee-output
uses: juliangruber/read-file-action@v1
with:
path: ./lychee/out.md
- uses: mshick/add-pr-comment@v2
if: failure()
with:
message: ${{ steps.lychee-output.outputs.content }}
- name: Save lychee cache
uses: actions/cache/save@v4
if: success()
with:
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
- name: Deploy gh-pages Preview
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.title, 'chore(deps):') }}
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
QUARTO_PROFILE: preview
- name: Update cynkrablog S3 bucket
if: github.event_name == 'push'
timeout-minutes: 7
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_CYNKRABLOG }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_CYNKRABLOG }}
AWS_REGION: eu-central-2
run: |
aws configure list
# S3
aws s3 sync docs s3://cynkraweb-blog --no-progress
aws cloudfront create-invalidation --distribution-id EN84WRZ43AIZQ --paths "/*"