This file contains 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
name: Continuous Delivery | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch_depth: 0 | |
- name: π§ Install java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: π§ Install clojure | |
uses: DeLaGuardo/setup-clojure@12.5 | |
with: | |
cli: 'latest' | |
- name: π maven cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2 | |
~/.gitlibs | |
~/.deps.clj | |
key: cljdeps-${{ hashFiles('deps.edn') }} | |
restore-keys: cljdeps- | |
- name: π Clerk Cache | |
uses: actions/cache@v4 | |
with: | |
path: .cache | |
key: ${{ runner.os }}-clerk | |
- name: π Clerk Build | |
run: clojure -X:nextjournal/clerk :path-prefix '"public/build/${{ github.sha }}/"' :git/sha '"${{ github.sha }}"' | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: 'public/build' | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |