Skip to content

Commit

Permalink
[ ci ] use GHC version as a cache key (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
gallais authored Oct 17, 2023
1 parent 9886f4e commit 6691f84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/generate-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
schedule:
- cron: 10 14 * * * # 10 minutes after 101 slot starts (UTC timezone)

env:
GHC_VERSION: 9.6

jobs:

build-and-deploy:
Expand All @@ -24,12 +27,13 @@ jobs:
filters: |
haskell-changed:
- '*.hs'
- '.github/workflows/generate-website.yml'
- name: Install cabal and GHC
if: github.event_name != 'schedule' && steps.changes.outputs.haskell-changed == 'true'
uses: haskell-actions/setup@v2
with:
ghc-version: '9.6'
ghc-version: ${{ env.GHC_VERSION }}
cabal-version: 'latest'

- name: Cache cabal and executables
Expand All @@ -39,8 +43,8 @@ jobs:
~/.cabal/store
~/_dist
~/.cabal/bin/
key: cabal-${{ runner.os }}-${{ github.sha }}
restore-keys: cabal-${{ runner.os }}
key: cabal-${{ runner.os }}-${{ env.GHC_VERSION }}-${{ github.sha }}
restore-keys: cabal-${{ runner.os }}-${{ env.GHC_VERSION }}

##### Installation #######################################
- name: Install Generate[101]
Expand Down
1 change: 1 addition & 0 deletions Generate101.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ prettyEncode ts file = do
BS.writeFile file $ encodePretty' cfg ts
-}

main :: IO ()
main = do
ts <- talks
let ts' = filter (not . cancelled . snd) ts
Expand Down

0 comments on commit 6691f84

Please sign in to comment.