11on :
2- push :
3- branches : [main, master]
4- release :
5- types : [published]
6- workflow_dispatch :
7-
8- name : demo-page
2+ push :
3+ branches : [main, master]
4+ release :
5+ types : [published]
6+ workflow_dispatch : {}
7+
8+ name : demo-website
99
1010jobs :
11- demo-page :
12- runs-on : ubuntu-latest
13- # Only restrict concurrency for non-PR jobs
14- concurrency :
15- group : quarto-publish-${{ github.event_name != 'pull_request' || github.run_id }}
16- permissions :
17- contents : write
18- steps :
19- - name : " Check out repository"
20- uses : actions/checkout@v4
11+ demo-page :
12+ runs-on : ubuntu-latest
13+ # Only restrict concurrency for non-PR jobs
14+ concurrency :
15+ group : quarto-publish-${{ github.event_name != 'pull_request' || github.run_id }}
16+ permissions :
17+ contents : read
18+ pages : write
19+ id-token : write
20+ steps :
21+
22+ - name : " Check out repository"
23+ uses : actions/checkout@v4
2124
22- - name : " Set up Quarto"
23- uses : quarto-dev/quarto-actions/setup@v2
24- with :
25- version : " pre-release"
25+ - name : " Setup R"
26+ uses : r-lib/actions/setup-r@v2
27+
28+ - name : " Setup R dependencies for Quarto's knitr engine"
29+ uses : r-lib/actions/setup-r-dependencies@v2
30+ with :
31+ Ncpus : ' 2L'
32+ packages :
33+ any::knitr
34+ any::rmarkdown
35+ any::downlit
36+ any::xml2
2637
27- - name : Publish to GitHub Pages (and render)
28- uses : quarto-dev/quarto-actions/publish@v2
29- with :
30- target : gh-pages
31- path : docs
38+ - name : " Set up Quarto"
39+ uses : quarto-dev/quarto-actions/setup@v2
40+ with :
41+ version : " pre-release"
42+
43+ # Render the Quarto file
44+ - name : " Render working directory"
45+ uses : quarto-dev/quarto-actions/render@v2
46+ with :
47+ path : " docs"
48+
49+
50+ # Upload a tar file that will work with GitHub Pages
51+ # Make sure to set a retention day to avoid running into a cap
52+ # This artifact shouldn't be required after deployment onto pages was a success.
53+ - name : Upload Pages artifact
54+ uses : actions/upload-pages-artifact@v3
55+ with :
56+ retention-days : 1
57+ path : ' docs/_site'
58+
59+
60+ # Use an Action deploy to push the artifact onto GitHub Pages
61+ # This requires the `Action` tab being structured to allow for deployment
62+ # instead of using `docs/` or the `gh-pages` branch of the repository
63+ - name : Deploy to GitHub Pages
64+ id : deployment
65+ uses : actions/deploy-pages@v4
0 commit comments