Skip to content

Commit a600e2f

Browse files
committed
add publish.yaml and related changes
1 parent dc9bc7b commit a600e2f

5 files changed

Lines changed: 607 additions & 437 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Thanks to Gemini for starting this yaml file, which I then edited.
2+
3+
# This workflow is for a Quarto project that is published as a website
4+
# to GitHub Pages. The workflow is triggered on pushes to the 'main' branch
5+
# and manually by a workflow_dispatch event.
6+
7+
name: Publish Quarto Site
8+
9+
on:
10+
push:
11+
branches:
12+
- main
13+
- user-manual-updates # Trigger on pushes to main or user-manual-updates
14+
workflow_dispatch: # Allow manual triggering from the GitHub UI
15+
16+
jobs:
17+
build-and-deploy:
18+
runs-on: ubuntu-latest
19+
container:
20+
image: rocker/r2u:latest
21+
permissions:
22+
contents: write # The workflow needs permission to push content to the repository
23+
24+
steps:
25+
- name: Setup Quarto
26+
uses: quarto-dev/quarto-actions/setup@v2
27+
28+
- uses: actions/checkout@v3
29+
- name: SessionInfo
30+
run: R -q -e 'sessionInfo()'
31+
- name: Package Dependencies
32+
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
33+
- name: Install inline
34+
run: R -q -e 'remotes::install_cran("inline")'
35+
- name: Build Package
36+
run: |
37+
R CMD build nCompiler
38+
R CMD INSTALL --install-tests nCompiler_*.tar.gz
39+
40+
- name: Render Quarto project
41+
run: |
42+
quarto render
43+
44+
- name: Deploy to GitHub Pages
45+
uses: quarto-dev/quarto-actions/publish@v2
46+
with:
47+
target-url: ${{ github.repositoryUrl }}
48+
# The publish action will automatically create a gh-pages branch
49+
# and force-push to it, overwriting history. This is the recommended
50+
# and efficient way to deploy a static site.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Quarto output directories
2+
_site/
3+
_book/
4+
docs/
15
# History files
26
.Rhistory
37
.Rapp.history
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/.quarto/
2+
3+
**/*.quarto_ipynb
4+

0 commit comments

Comments
 (0)