Skip to content

move configure pages under deploy #14

move configure pages under deploy

move configure pages under deploy #14

name: Continuous Deployment
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Cache deps.edn dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: clj-${{ runner.os }}-${{ hashFiles('**/deps.edn') }}
restore-keys: clj-${{ runner.os }}-
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Clojure
uses: DeLaGuardo/setup-clojure@12.5
with:
cli: latest
bb: latest
- name: Lint
run: clojure -M:clj-kondo --lint src test
- name: Test
run: bin/kaocha
build:
name: Build
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Cache deps.edn dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: clj-${{ runner.os }}-${{ hashFiles('**/deps.edn') }}
restore-keys: clj-${{ runner.os }}-
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Clojure
uses: DeLaGuardo/setup-clojure@12.5
with:
cli: latest
bb: latest
- name: Build
run: bb build
- name: Upload artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: 'static-site'
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4