Skip to content

Build & Deploy Website #35

Build & Deploy Website

Build & Deploy Website #35

Workflow file for this run

---
name: Build & Deploy Website
on:
workflow_call:
secrets:
REPO_GITHUB_TOKEN:
description: |
Github token with write access to the repository
required: false
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "10 10 * * *"
jobs:
build-deploy:
name: Build & Deploy Website
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Cache artifacts
uses: actions/cache@v3
with:
path: _freeze
key: ${{ runner.os }}-examples
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Setup R Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
- name: Create artifact
if: startsWith(github.ref, 'refs/tags/v')
run: |
zip -r9 site.zip *
shell: bash
working-directory: _site
- name: Upload docs
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v3
with:
name: site.zip
path: site.zip
- name: Publish docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site