Skip to content

Commit dbeb86a

Browse files
committed
Add example for HTML quarto book
1 parent 092cf7b commit dbeb86a

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ This repository stores [Github Actions](https://github.com/features/actions) aro
44

55
1. [quarto-dev/quarto-actions/install-quarto](https://github.com/quarto-dev/quarto-actions/tree/master/install-quarto) - Install Quarto binary
66

7+
## Examples
8+
9+
See [Examples](./examples) for different YAML worflow file to render and deploy Quarto documents and projects

examples/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Examples of workflow YAML files
2+
3+
## Quarto Book
4+
5+
- Render a HTML Quarto Book and deploy to github pages ([`quarto-book-gh-pages.yaml`](./quarto-book-gh-pages.yaml))

examples/quarto-book-gh-pages.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
on:
2+
push:
3+
branches: main
4+
pull_request:
5+
branches: main
6+
# to be able to trigger a manual build
7+
workflow_dispatch:
8+
9+
name: Render and deploy Book
10+
11+
jobs:
12+
build-deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Install Quarto
18+
uses: quarto-dev/quarto-actions/install-quarto@v1
19+
# uncomment and fill to pin a version
20+
# with:
21+
# version: 0.9.105
22+
23+
- name: Render book to all format
24+
# Add any command line argument needed
25+
run: |
26+
quarto render --to html
27+
28+
- name: Deploy 🚀
29+
# only deploy when push to main
30+
if: github.event_name != 'pull_request'
31+
uses: JamesIves/github-pages-deploy-action@v4
32+
with:
33+
# The branch the action should deploy to.
34+
branch: gh-pages
35+
# The folder the action should deploy. Adapt if you changed in Quarto config
36+
folder: _book

0 commit comments

Comments
 (0)