This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-23
Channels
- # announcements (66)
- # babashka (41)
- # beginners (93)
- # calva (10)
- # cider (2)
- # clj-kondo (112)
- # cljs-dev (6)
- # cljsrn (1)
- # clojure (44)
- # clojure-dev (10)
- # clojure-europe (35)
- # clojure-italy (15)
- # clojure-nl (3)
- # clojure-uk (2)
- # clojurescript (38)
- # conjure (1)
- # datalevin (1)
- # datomic (16)
- # deps-new (4)
- # events (7)
- # figwheel-main (1)
- # fulcro (59)
- # graalvm (21)
- # integrant (3)
- # introduce-yourself (8)
- # jobs-discuss (2)
- # malli (23)
- # membrane (11)
- # membrane-term (2)
- # missionary (17)
- # off-topic (7)
- # pathom (23)
- # pedestal (6)
- # polylith (7)
- # portal (25)
- # releases (1)
- # remote-jobs (3)
- # reveal (5)
- # shadow-cljs (43)
- # spacemacs (7)
- # sql (18)
- # tools-deps (33)
- # vim (10)
- # xtdb (36)
Is there a babashka script / task that updates github pages in a build? I found github actions that update github pages based on a directory in the git repo. But this means that all kind of files have to be in source code revision management. Adn I dont want that. Babashka should just upload a folder that gets calculated in the ci pipeline to github pages.
@hoertlehner Here is an example of an approach that is used with babashka: https://github.com/liquidz/liquidz/blob/master/build.clj
and oh btw, this is also an example of how to use the GraphQL API with bb /cc @U0HFRSY0M
take a look at this: https://github.com/babashka/fs#codox
it does need to be under version control but it can be a separate branch so you don't pollute your main branch with this stuff.
But I need to run this in the CI pipeline .. which will work .. but If I dont check the output into the repo, then I need an api to send the files to GitHub
I do the same thing for scittle: https://github.com/babashka/scittle/blob/main/doc/dev.md
After 2 years working on this Project I am finally headed towards something that I can release to the public
I'm quite happy with this approach:
name: Run Script
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Run script
runs-on: [self-hosted, research]
container: bitnami/git:2.34.0
steps:
- name: Checkout
uses: actions/[email protected]
- name: install babashka
run: |
curl -s -o install.sh
bash install.sh --version 0.6.5
- name: Generate page(s)
run: bb your-html-creating-babashka-script-here.clj
- name: Install rsync # needed for the publish action
run: |
apt-get update
apt-get install -y rsync
- name: Publish
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: publish
git-config-name: Github Actions
git-config-email:
(so locally I just check my publish folder in the main
branch and never bother to look at the gh-pages
branch; that is taken care of by the action)
@U088NU894 you run github actions self-hosted?
yes .. for work we have self hosted runners because of ip, security, partial access to our VPN etc
If anyone's interested, I've started working on a babashka home automation system https://github.com/xlfe/radiale - the idea being clojure is a better language to drive a home automation backend than Python! but python has all the interop with IOT things. I've currently got MQTT-client, mdns, esphome and deconz working. My first attempt (https://github.com/xlfe/cljhome) was to do it all with a graal image, but I realised I didn't need to reinvent everything that's in python, just utilise babashka's pod model..
tools namespace lite: discover namespaces with pure clojure. https://gist.github.com/borkdude/fb42d1997f6e79c445cf1ae213ac9e9f works with babashka on master.