summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/deploy.yml')
-rw-r--r--.github/workflows/deploy.yml66
1 files changed, 66 insertions, 0 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..eb4048a
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,66 @@
+name: Build and Deploy to GitHub Pages
+
+on:
+ push:
+ branches: [ main ]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+concurrency:
+ group: "pages"
+ cancel-in-progress: false
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+
+ - name: Cache Clojure dependencies
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.m2/repository
+ ~/.gitlibs
+ ~/.deps.clj
+ key: ${{ runner.os }}-clojure-${{ hashFiles('**/deps.edn') }}
+ restore-keys: |
+ ${{ runner.os }}-clojure-
+
+ - name: Install Clojure CLI tools
+ uses: DeLaGuardo/setup-clojure@12.5
+ with:
+ cli: 1.11.1.1429
+
+ - name: Build site
+ run: clojure -M -m core
+
+ - name: Setup Pages
+ uses: actions/configure-pages@v5
+
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: 'target/html'
+
+ 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