src: change deploy target
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -58,6 +58,8 @@
|
|||||||
haskell-language-server
|
haskell-language-server
|
||||||
ghcid
|
ghcid
|
||||||
];
|
];
|
||||||
|
SSHTARGET = "bat@weirdnatto.in:/var/lib/site/";
|
||||||
|
SSHTARGETPORT = 22001;
|
||||||
};
|
};
|
||||||
packages = {
|
packages = {
|
||||||
inherit nattopages site;
|
inherit nattopages site;
|
||||||
|
12
src/site.hs
12
src/site.hs
@@ -19,6 +19,8 @@ import Text.Pandoc
|
|||||||
)
|
)
|
||||||
import qualified Text.Pandoc as Pandoc
|
import qualified Text.Pandoc as Pandoc
|
||||||
import Text.Pandoc.Templates (Template, compileTemplate)
|
import Text.Pandoc.Templates (Template, compileTemplate)
|
||||||
|
import System.Environment (getEnv)
|
||||||
|
import System.IO.Unsafe (unsafePerformIO)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -213,12 +215,14 @@ rssFeedConfiguration =
|
|||||||
config :: Configuration
|
config :: Configuration
|
||||||
config =
|
config =
|
||||||
defaultConfiguration
|
defaultConfiguration
|
||||||
{ deployCommand =
|
{ deployCommand = "rsync --checksum -ave 'ssh -p" ++ sshTargetPort ++"' _site/* " ++ sshTarget,
|
||||||
"rsync --checksum -ave 'ssh -p 22001' \
|
|
||||||
\_site/* \
|
|
||||||
\root@weirdnatto.in:/var/lib/site/",
|
|
||||||
previewPort = 3333
|
previewPort = 3333
|
||||||
}
|
}
|
||||||
|
where
|
||||||
|
{-# NOINLINE sshTarget#-}
|
||||||
|
sshTarget = unsafePerformIO $ getEnv "SSHTARGET"
|
||||||
|
{-# NOINLINE sshTargetPort#-}
|
||||||
|
sshTargetPort = unsafePerformIO $ getEnv "SSHTARGETPORT"
|
||||||
|
|
||||||
postCtx :: Tags -> Context String
|
postCtx :: Tags -> Context String
|
||||||
postCtx tags =
|
postCtx tags =
|
||||||
|
Reference in New Issue
Block a user