Skip to content

Commit 2aab797

Browse files
committed
Replace workflows with new GitHub Pages publish workflow
- Remove old publish.yml and tic.yml workflows - Add new publish.yml that publishes to gh-pages on main/master pushes - Use latest Quarto Actions (v2) with TinyTeX support - Include proper permissions for GitHub Pages deployment
1 parent 04c7f31 commit 2aab797

File tree

2 files changed

+26
-149
lines changed

2 files changed

+26
-149
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
1-
name: Publish Quarto Project
1+
name: Render and Publish
22

33
on:
44
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
5+
branches: [main, master]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: write
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
819

920
jobs:
10-
build-and-deploy:
21+
build-deploy:
1122
runs-on: ubuntu-latest
12-
permissions:
13-
contents: write
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
1426
steps:
1527
- name: Check out repository
1628
uses: actions/checkout@v4
1729

1830
- name: Set up Quarto
1931
uses: quarto-dev/quarto-actions/setup@v2
2032
with:
21-
version: "prerelease"
22-
23-
- name: Render Quarto Project
24-
uses: quarto-dev/quarto-actions/render@v1
33+
# To install LaTeX to build PDF book
34+
tinytex: true
2535

26-
- name: Deploy to GitHub Pages
27-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
28-
uses: peaceiris/actions-gh-pages@v3
36+
- name: Render and Publish
37+
uses: quarto-dev/quarto-actions/publish@v2
2938
with:
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
publish_dir: _book
32-
force_orphan: true
39+
target: gh-pages
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tic.yml

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)