Skip to content

Commit

Permalink
try building site with GHActions
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Oct 28, 2024
1 parent bd4c5d0 commit d1f681f
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
on:
push:
branches: [main]
release:
types: [published]
workflow_dispatch: {}

name: demo-website

jobs:
demo-page:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: quarto-publish-${{ github.event_name != 'pull_request' || github.run_id }}
permissions:
contents: write
steps:
- name: "Check out repository"
uses: actions/checkout@v4

# To render using knitr, we need a few more setup steps...
# If we didn't want the examples to use `engine: knitr`, we could
# skip a few of the setup steps.
- name: "Setup R"
uses: r-lib/actions/setup-r@v2

- name: "Setup R dependencies for Quarto's knitr engine"
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: any::knitr
any::rmarkdown
any::downlit
any::xml2
any::ggplot2

# install ms-corefonts for Arial font since Proxima Nova isn't available
- name: "Install ms-corefonts"
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt install ttf-mscorefonts-installer
# update font cache
- name: "Update font cache"
run: sudo fc-cache -fv

# Back to our regularly scheduled Quarto output
- name: "Set up Quarto"
uses: quarto-dev/quarto-actions/setup@v2
with:
version: "pre-release"
tinytex: true # required for PDF reports

- name: Add extension directly into demos
working-directory: ./docs/demos
run: |
quarto add AAGI-AUS/AAGIQuarto --no-prompt
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
path: docs
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.PHONY: asset-revealjs asset-docx asset-report asset-pdf-short-report assets help
.DEFAULT_GOAL := help

asset-revealjs: ## Render reveal.js Slides
quarto render aagi_cu_trial_design.qmd --output-dir assets
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ You will need [Quarto](https://quarto.org) installed locally to rebuild the slid
Then, the `aagi_cu_trial_design.qmd` can be knit to create `aagi_cu_trial_design.html`.

[Playwright.py](https://playwright.dev/python/docs/intro) was used to generate `aagi_cu_trial_design.pdf` for printed handouts via `render_pdf.py`.


0 comments on commit d1f681f

Please sign in to comment.