Skip to content

Commit

Permalink
ci: update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramblurr committed May 27, 2024
1 parent 4facdb5 commit 1d9b220
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 54 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ on:
- main
jobs:
publish:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache Maven packages
uses: actions/cache@v4
with:
Expand All @@ -18,7 +20,10 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/deps.edn') }}
restore-keys: ${{ runner.os }}-m2

- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install clojure tools
uses: DeLaGuardo/[email protected]
Expand All @@ -28,11 +33,18 @@ jobs:
bb: latest

- name: Build static site
run: bb build-static
run: bb release-gh-pages

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
- 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
8 changes: 4 additions & 4 deletions bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
(do (X "clojure -X:dev:nextjournal/clerk")
(spit "./public/CNAME" ""))}

release-gh-pages
{:doc "Generate a fresh static build and release it to Github Pages."
build-gh-pages
{:doc "Generate a fresh static build ready to be pushed to Github Pages."
:task
(do (shell "rm -rf public")
(run 'build-static)
(shell "npm run gh-pages"))}
(shell "npm install")
(run 'build-static))}

publish-local
{:doc "Generate a fresh static build in the `public` folder and start a local
Expand Down
81 changes: 40 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
{
"dependencies": {
"@codemirror/autocomplete": "^6.0.2",
"@codemirror/commands": "^6.0.0",
"@codemirror/lang-markdown": "6.0.0",
"@codemirror/language": "^6.1.0",
"@codemirror/lint": "^6.0.0",
"@codemirror/search": "^6.0.0",
"@codemirror/state": "^6.0.1",
"@codemirror/view": "^6.0.2",
"@lezer/common": "^1.0.0",
"@lezer/generator": "^1.0.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0",
"@lezer/markdown": "^1.0.0",
"@nextjournal/lang-clojure": "^1.0.0",
"@nextjournal/lezer-clojure": "1.0.0",
"d3-require": "^1.2.4",
"emoji-regex": "^10.0.0",
"framer-motion": "^10.12.16",
"gh-pages": "^3.2.3",
"http-server": "^14.1.1",
"katex": "^0.12.0",
"lezer-clojure": "1.0.0-rc.2",
"markdown-it": "^12.2.0",
"markdown-it-block-image": "^0.0.3",
"markdown-it-footnote": "^3.0.3",
"markdown-it-texmath": "^1.0.0",
"markdown-it-toc-done-right": "^4.2.0",
"punycode": "2.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"shadow-cljs": "2.28.8",
"use-sync-external-store": "^1.2.0",
"vh-sticky-table-header": "^1.2.1",
"w3c-keyname": "2.2.4",
"p5": "^1.9.4"
},
"scripts": {
"gh-pages": "gh-pages -d public --dotfiles true",
"serve": "http-server -c-1 -o -p 8080"
}
"dependencies": {
"@codemirror/autocomplete": "^6.0.2",
"@codemirror/commands": "^6.0.0",
"@codemirror/lang-markdown": "6.0.0",
"@codemirror/language": "^6.1.0",
"@codemirror/lint": "^6.0.0",
"@codemirror/search": "^6.0.0",
"@codemirror/state": "^6.0.1",
"@codemirror/view": "^6.0.2",
"@lezer/common": "^1.0.0",
"@lezer/generator": "^1.0.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0",
"@lezer/markdown": "^1.0.0",
"@nextjournal/lang-clojure": "^1.0.0",
"@nextjournal/lezer-clojure": "1.0.0",
"d3-require": "^1.2.4",
"emoji-regex": "^10.0.0",
"framer-motion": "^10.12.16",
"gh-pages": "^6.1.1",
"http-server": "^14.1.1",
"katex": "^0.12.0",
"lezer-clojure": "1.0.0-rc.2",
"markdown-it": "^12.2.0",
"markdown-it-block-image": "^0.0.3",
"markdown-it-footnote": "^3.0.3",
"markdown-it-texmath": "^1.0.0",
"markdown-it-toc-done-right": "^4.2.0",
"punycode": "2.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"shadow-cljs": "2.28.8",
"use-sync-external-store": "^1.2.0",
"vh-sticky-table-header": "^1.2.1",
"w3c-keyname": "2.2.4",
"p5": "^1.9.4"
},
"scripts": {
"serve": "http-server -c-1 -o -p 8080"
}
}

0 comments on commit 1d9b220

Please sign in to comment.