add subpage template #9
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 deployment | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install clojure tools | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: 1.11.1.1347 | |
- name: Cache clojure dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2/repository | |
~/.gitlibs | |
~/.deps.clj | |
# List all files containing dependencies: | |
key: cljdeps-${{ hashFiles('deps.edn') }} | |
#key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }} | |
#key: cljdeps-${{ hashFiles('project.clj') }} | |
#key: cljdeps-${{ hashFiles('build.boot') }} | |
restore-keys: cljdeps- | |
- run: clojure -M:build | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: | | |
dist | |
deploy: | |
if: github.ref_name == 'main' | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/download-artifact@v3 | |
- name: Fix permissions | |
run: | | |
chmod -v -R +rX "artifact/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: artifact/ | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v2 |