-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eaa19a6
commit a499a72
Showing
5 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: push to github pages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
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: Setup Clojure | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.12.0.1479 | ||
- name: Build html | ||
run: clj -X com.grahamcarlyle.blog/build :output-dir '"public"' | ||
- name: Upload pages artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: public/ | ||
deploy: | ||
needs: build | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/deploy-pages@v2 | ||
id: deployment |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.iml | ||
.idea | ||
.cpcache |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{:paths ["src" "resources"] | ||
:deps {org.clojure/clojure {:mvn/version "1.12.0"} | ||
babashka/fs {:mvn/version "0.4.19"} | ||
hiccup/hiccup {:mvn/version "2.0.0-RC3"}}} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns com.grahamcarlyle.blog | ||
(:require | ||
[babashka.fs :as fs] | ||
[clojure.java.io :as io] | ||
[hiccup2.core :as h])) | ||
|
||
(defn declaration-of-intent [] | ||
(h/html [:div | ||
[:p "Declaration of intent to share scrappy fiddles."] | ||
[:p | ||
"I'm still thinking about whether I am compelled to " | ||
[:a | ||
{:href "https://www.todepond.com/sky/normalise-dont-share-lol/"} | ||
"normalise sharing scrappy fiddles"]]])) | ||
|
||
(defn build [{:keys [output-dir]}] | ||
(fs/create-dirs "output") | ||
(spit (io/file output-dir "index.html") (declaration-of-intent))) | ||
|
||
(comment | ||
(build {:output-dir "output"}) | ||
) |