aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2019-06-23 21:42:45 +0200
committerJoris2019-06-23 21:42:45 +0200
commit9ec62069677c520161a5b2c15a3c33438e2ec252 (patch)
tree58fb6b4dfec0a71b009c99b605224b2408225bc6
parentca31e0ee11d05b3250aa35db5baa0b155939bbbd (diff)
Add recipe and deploy to own server
-rw-r--r--.gitlab-ci.yml37
-rw-r--r--Makefile4
-rw-r--r--README.md6
-rw-r--r--recettes/desserts/hyperglucidique/galettes.md42
-rw-r--r--src/Main.hs5
5 files changed, 52 insertions, 42 deletions
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" ]
}