Skip to content

Commit 70aec21

Browse files
committed
Enable action
1 parent 489e6c6 commit 70aec21

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/publish-quarto.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
on:
2+
push:
3+
branches: [main, master]
4+
release:
5+
types: [published]
6+
workflow_dispatch: {}
7+
8+
name: demo-quarto-app
9+
10+
jobs:
11+
demo-website:
12+
runs-on: ubuntu-latest
13+
# Only restrict concurrency for non-PR jobs
14+
concurrency:
15+
group: quarto-website-${{ github.event_name != 'pull_request' || github.run_id }}
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
steps:
21+
- name: "Check out repository"
22+
uses: actions/checkout@v4
23+
24+
# To render using knitr, we need a few more setup steps...
25+
# If we didn't want the examples to use `engine: knitr`, we could
26+
# skip a few of the setup steps.
27+
- name: "Setup pandoc"
28+
uses: r-lib/actions/setup-pandoc@v2
29+
30+
- name: "Setup R"
31+
uses: r-lib/actions/setup-r@v2
32+
33+
# Pinned shinylive dependency
34+
- name: "Setup R dependencies for Quarto's knitr engine"
35+
uses: r-lib/actions/setup-r-dependencies@v2
36+
with:
37+
packages:
38+
cran::shinylive@0.1.1
39+
any::knitr
40+
any::rmarkdown
41+
any::downlit
42+
any::xml2
43+
44+
# Setup Quarto
45+
- name: "Set up Quarto"
46+
uses: quarto-dev/quarto-actions/setup@v2
47+
48+
# Install quarto extensions
49+
- name: "Install quarto extension for shinylive and quarto-webr"
50+
shell: bash
51+
run: |
52+
quarto add --no-prompt quarto-ext/shinylive
53+
quarto add --no-prompt coatless/quarto-webr@0.4.0
54+
55+
# Render the Quarto file
56+
- name: "Render working directory"
57+
uses: quarto-dev/quarto-actions/render@v2
58+
59+
# Upload a tar file that will work with GitHub Pages
60+
# Make sure to set a retention day to avoid running into a cap
61+
# This artifact shouldn't be required after deployment onto pages was a success.
62+
- name: Upload Pages artifact
63+
uses: actions/upload-pages-artifact@v2
64+
with:
65+
retention-days: 1
66+
67+
# Use an Action deploy to push the artifact onto GitHub Pages
68+
# This requires the `Action` tab being structured to allow for deployment
69+
# instead of using `docs/` or the `gh-pages` branch of the repository
70+
- name: Deploy to GitHub Pages
71+
id: deployment
72+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)