Skip to content

Commit 58486bd

Browse files
committed
build: add github pages publish action
1 parent a7d8668 commit 58486bd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/gh-pages.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Set a branch name to trigger deployment
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- uses: actions/cache@v3
12+
with:
13+
path: |
14+
.cpcache
15+
.shadow-cljs
16+
~/.m2
17+
key: "1"
18+
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
22+
- name: Install clojure tools
23+
uses: DeLaGuardo/setup-clojure@master
24+
with:
25+
cli: latest
26+
bb: latest
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build static site
30+
run: bb build-static
31+
32+
- name: Deploy
33+
uses: peaceiris/actions-gh-pages@v3
34+
if: ${{ github.ref == 'refs/heads/main' }}
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./public/build

0 commit comments

Comments
 (0)