Skip to content

Commit

Permalink
Disable Circle CI for gh-pages branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizunashi Mana committed Nov 6, 2018
1 parent aeb0ac6 commit 9f34d4e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions haskell-jp-blog.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ executable site
, hakyll
, pandoc-types
, skylighting
, filepath
ghc-options: -threaded -Wall
default-language: Haskell2010

Expand Down
2 changes: 2 additions & 0 deletions preprocessed-site/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version: 2
jobs: {}
13 changes: 13 additions & 0 deletions src/site.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Data.Monoid ((<>))
import qualified Data.Tree as Tree
import Data.Typeable (Typeable)
import Hakyll
import System.FilePath (takeFileName)
import Skylighting (pygments, styleToCss)
import Text.Pandoc.Definition ( Inline(Space, Span, Str)
, Pandoc(Pandoc)
Expand All @@ -33,7 +34,14 @@ hakyllConfig = def { providerDirectory = "preprocessed-site"
, storeDirectory = ".hakyll-cache"
, tmpDirectory = ".hakyll-cache/tmp"
, destinationDirectory = "generated-site"
, ignoreFile = ignoreFile'
}
where
ignoreFile' path
| fname == ".circleci" = False
| otherwise = ignoreFile def path
where
fname = takeFileName path

main :: IO ()
main = hakyllWith hakyllConfig $ do
Expand Down Expand Up @@ -65,6 +73,11 @@ main = hakyllWith hakyllConfig $ do
route idRoute
compile copyFileCompiler

-- disable Circle CI
match ".circleci/*" $ do
route idRoute
compile copyFileCompiler

-- index.html
match "index.html" $ do
route idRoute
Expand Down

1 comment on commit 9f34d4e

@haskell-jp-bot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.