-
Notifications
You must be signed in to change notification settings - Fork 55
105 lines (87 loc) · 2.88 KB
/
render-and-publish.yml
File metadata and controls
105 lines (87 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
on:
push:
branches:
- main
workflow_dispatch:
name: Render and Publish
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full history so posts can mine `git log` (Babqua demos)
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install plotly kaleido
pip install --index-url https://download.pytorch.org/whl/cpu torch numpy
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Set up Clojure
uses: DeLaGuardo/setup-clojure@main
with:
cli: 'latest'
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
key: cljdeps-${{ hashFiles('deps.edn') }}
restore-keys: cljdeps-
- name: Build the content notebooks
run: clojure -M:clay -A:markdown
- name: Install lsof and apt prerequisites for Janqua
run: sudo apt-get update && sudo apt-get install -y lsof gnupg lsb-release
- name: Install Babashka
run: curl -L https://raw.githubusercontent.com/babashka/babashka/master/install | sudo bash
- name: Install bbin
run: |
sudo curl -L https://raw.githubusercontent.com/babashka/bbin/v0.2.4/bbin -o /usr/local/bin/bbin
sudo chmod +x /usr/local/bin/bbin
- name: Install Jank
run: |
curl -s https://ppa.jank-lang.org/KEY.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/jank.gpg >/dev/null
sudo curl -s -o /etc/apt/sources.list.d/jank.list https://ppa.jank-lang.org/jank.list
sudo apt-get update
sudo apt-get install -y jank
- name: Install clj-nrepl-eval
run: |
bbin install https://github.com/bhauman/clojure-mcp-light.git --tag v0.2.1 --as clj-nrepl-eval --main-opts '["-m" "clojure-mcp-light.nrepl-eval"]'
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- name: Render Quarto
uses: quarto-dev/quarto-actions/render@v2
with:
path: site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/_site
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4