ci: update build workflow #3
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: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.cpcache | |
.shadow-cljs | |
~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/deps.edn') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: Install clojure tools | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: latest | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
bb: latest | |
- name: Build static site | |
run: bb release-gh-pages | |
- name: Deploy with gh-pages | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
npx gh-pages -d public --dotfiles true -u "github-actions-bot <[email protected]>" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
#- name: Deploy | |
# uses: peaceiris/actions-gh-pages@v4 | |
# if: ${{ github.ref == 'refs/heads/main' }} | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: ./public |