Merge pull request #373 from ClojureCivitas/babqua-support #555
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |