From 9ec62069677c520161a5b2c15a3c33438e2ec252 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 23 Jun 2019 21:42:45 +0200 Subject: Add recipe and deploy to own server --- .gitlab-ci.yml | 37 ----------------------- Makefile | 4 +++ README.md | 6 ++-- recettes/desserts/hyperglucidique/galettes.md | 42 +++++++++++++++++++++++++++ src/Main.hs | 5 ++-- 5 files changed, 52 insertions(+), 42 deletions(-) delete mode 100644 .gitlab-ci.yml create mode 100644 recettes/desserts/hyperglucidique/galettes.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 2016415..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -image: haskell:latest - -variables: - STACK_ROOT: "${CI_PROJECT_DIR}/.stack" - STACK_OPTS: "--system-ghc" - -cache: - paths: - - .stack - - .stack-work - - target - - output - - node_modules - - yarn.lock - - .psc-package - -pages: - script: - - apt-get update - - apt-get install -y curl - - curl -sL https://deb.nodesource.com/setup_8.x | bash - - apt-get install -y xz-utils make nodejs - - npm install psc-package - - npm install purescript - - npm install pulp - - export PATH="$(pwd)/node_modules/.bin":$PATH - - psc-package install - - make test - - export STACK_ROOT="$(pwd)/.stack" - - stack setup - - stack build - - stack exec cooking build - artifacts: - paths: - - public - only: - - master diff --git a/Makefile b/Makefile index 2ab6ba2..9a926ec 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,10 @@ build: @stack build @stack exec cooking build +deploy: + @make build + @stack exec cooking deploy + watch: @nodemon --watch src -e hs --exec 'make watch-command --silent' diff --git a/README.md b/README.md index 2787d31..f0ba64d 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,12 @@ Later, stop the environment with: make stop ``` -## Build +## Deploy ```bash -./build +./make deploy ``` -## TODO +## Improvements - transform points into todo items diff --git a/recettes/desserts/hyperglucidique/galettes.md b/recettes/desserts/hyperglucidique/galettes.md new file mode 100644 index 0000000..f7bd235 --- /dev/null +++ b/recettes/desserts/hyperglucidique/galettes.md @@ -0,0 +1,42 @@ +--- +title: Galettes +--- + +Ingrédients +=========== + +1ère partie +----------- + +- 300 g de farine de sarrasin +- 2 CS de farine de froment +- 1 cc de sel +- 300 ml d’eau + +2ème partie +----------- + +- 1 CS rase de miel (si possible du miel de fleurs de sarrasin) +- 1 œuf +- 200 ml de lait +- 100 ml d’eau + +Recette +======= + +1ère partie +----------- + +#. Mélanger la farine de sarrasin, la farine de froment et le sel. +#. Ajouter l’eau. +#. Battre plusieurs minutes avec une cuillère ou spatule en bois. +#. Couvrir d’un tochon propre. +#. Laisser reposer quelques heures, dans une pièce tempérée ou au réfrigérateur. + +2ème partie +----------- + +#. Ajouter le miel et l’œuf. +#. Battre. +#. Ajouter le lait et l’eau. +#. Mélanger. diff --git a/src/Main.hs b/src/Main.hs index d0dd91f..11ea34a 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -3,10 +3,10 @@ import Data.List (sortBy) import Data.Monoid (mappend) import Data.Ord (comparing) - import Hakyll import Hakyll.Core.Item (Item (itemIdentifier)) import System.Process (readProcess) +import qualified System.Process as Process (rawSystem) main :: IO () main = hakyllWith configuration $ do @@ -51,5 +51,6 @@ main = hakyllWith configuration $ do configuration :: Configuration configuration = defaultConfiguration { destinationDirectory = "public" - , inMemoryCache = True + , deploySite = const $ + Process.rawSystem "rsync" [ "-avzh", "public/", "joris@guyonvarch.me:/var/www/cooking.guyonvarch.me" ] } -- cgit v1.2.3