Skip to content

Commit 7839605

Browse files
committed
use conda-lock for quarto renders, do not freeze execution when code changes
1 parent 59b1a0c commit 7839605

File tree

4 files changed

+22660
-14
lines changed

4 files changed

+22660
-14
lines changed

.github/workflows/pr-pub.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
if: github.event.action != 'closed'
2222
uses: mamba-org/setup-micromamba@v2
2323
with:
24-
environment-file: environment.yml
24+
environment-file: conda-lock.yml
25+
environment-name: ci
2526
init-shell: bash
2627
cache-environment: true
2728

.github/workflows/publish.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
workflow_dispatch:
33
push:
4-
branches: main
4+
branches: [main]
55

66
name: Quarto Publish
77

@@ -10,24 +10,33 @@ jobs:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
13+
pages: write
1314
steps:
1415
- name: Check out repository
1516
uses: actions/checkout@v4
1617

1718
- name: Set up Quarto
1819
uses: quarto-dev/quarto-actions/setup@v2
1920

20-
- name: Install Python and Dependencies
21-
uses: actions/setup-python@v5
21+
- name: Setup micromamba
22+
if: github.event.action != 'closed'
23+
uses: mamba-org/setup-micromamba@v2
2224
with:
23-
python-version: '3.10'
24-
cache: 'pip'
25-
- run: pip install jupyter
26-
- run: pip install -r requirements.txt
25+
environment-file: conda-lock.yml
26+
environment-name: ci
27+
init-shell: bash
28+
cache-environment: true
2729

28-
- name: Render and Publish
29-
uses: quarto-dev/quarto-actions/publish@v2
30+
- name: Render Quarto Project using mamba environment
31+
if: github.event.action != 'closed'
32+
shell: micromamba-shell {0}
33+
run: quarto render
34+
35+
- name: Deploy to GitHub Pages
36+
if: github.event.action != 'closed'
37+
uses: peaceiris/actions-gh-pages@v3
3038
with:
31-
target: gh-pages
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: ./_site
41+
keep_files: true
42+

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ filters:
9898
- quarto
9999

100100
execute:
101-
freeze: true
101+
freeze: auto

0 commit comments

Comments
 (0)