day 17 #30
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: Pages | |
on: push | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: Install clojure | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: 'latest' | |
- name: Cache clojure dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2 | |
~/.gitlibs | |
~/.deps.clj | |
# List all files containing dependencies: | |
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 |