You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow a configuration file to be passed to the -main function, which is used to build and publish the Cryogen blog
TODO: refactor the code so that the zero argument branch calls the config-file branch, e.g.
(defn-main"Start Cryogen with optional configuration file"
([]
(-main"content/config.edn") ;; TODO: test this approach works and path to config file is correct;; (load-plugins);; (compile-assets-timed );; (System/exit 0))
([config-file]
(load-plugins)
;; Would edn reader be better than read-string?
(compile-assets-timed (read-string (slurp config-file)))
(System/exit0)))
Publish Staging Website GitHub workflow
---
name: Publish Blog Stagingon: [pull_request]jobs:
publish:
runs-on: ubuntu-lateststeps:
- name: Checkoutuses: actions/checkout@v3
- name: Prepare javauses: actions/setup-java@v3.5.1with:
distribution: 'temurin'java-version: '17'
- name: 'Cache Clojure Dependencies'uses: actions/cache@v3with:
path: | ~/.m2/repository ~/.gitlibskey: cache-clojure-deps-${{ hashFiles('**/deps.edn') }}restore-keys: cache-clojure-deps-
- name: Install clojure toolsuses: DeLaGuardo/setup-clojure@9.5with:
cli: 1.11.1.1165
- name: Build Blog siterun: clojure -M:build content/config-staging.edn
- name: Publish to GitHub Pages# Publish to a separate repository as GitHub pages can only be served from one branch# The GitHub repository for staging the website must be created before running this workflow# Requires developer token as deploying across repositoriesuses: JamesIves/github-pages-deploy-action@v4.4.1with:
repository-name: practicalli/blog-stagingtoken: ${{ secrets.CRYOGEN_PUBLISH_TOKEN }}branch: gh-pages # The branch the action should deploy to.folder: public/blog-staging # The folder the action should deploy.commit-message: ${{ github.event.head_commit.message }}single-commit: yes
Create a Cryogen template to create a new blog project that includes
src.cryogen.core/-main
to take a config file via the command lineCode modifications
Allow a configuration file to be passed to the
-main
function, which is used to build and publish the Cryogen blogPublish Staging Website GitHub workflow
Related: practicalli/clojure#404
The text was updated successfully, but these errors were encountered: