From e55b4f1af32a55a5a746dae3f4f7b5fcec2eb233 Mon Sep 17 00:00:00 2001 From: Caden Haustein Date: Wed, 22 Jun 2022 10:52:01 -0500 Subject: [PATCH] Fix workflow with updated haskell action and better caching --- .github/workflows/build-deploy.yml | 24 +++++++++++------------- .gitignore | 3 ++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 298f650..1f62ba1 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -11,24 +11,22 @@ jobs: name: Build and deploy runs-on: ubuntu-latest env: - CABAL_VERSION: '3.6' - GHC_VERSION: '8.10.7' + GHC_VERSION: '8.10' steps: - - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 + - uses: actions/checkout@v3 + - uses: haskell/actions/setup@v2 with: ghc-version: ${{env.GHC_VERSION}} - cabal-version: ${{env.CABAL_VERSION}} - - name: 'Run actions/cache@v1: cache cabal store' - uses: actions/cache@v1 + - name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle + uses: actions/cache@v3 with: - path: ~/.cabal/store - key: cabal-store-${{ runner.OS }}-${{ env.GHC_VERSION }}-${{ hashFiles('cabal.project.freeze') }} - restore-keys: | - cabal-store-${{ runner.OS }}-${{ env.GHC_VERSION }}- - cabal-store-${{ runner.OS }}- - - run: cabal update + path: | + ~/.cabal/packages + ~/.cabal/store + dist-newstyle + key: ${{ runner.os }}-${{ env.GHC_VERSION }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} + restore-keys: ${{ runner.os }}-${{ env.GHC_VERSION }}- - run: cabal build --only-dependencies - run: cabal build - run: cabal exec site build diff --git a/.gitignore b/.gitignore index e4fd7ce..72e1b74 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -_cache \ No newline at end of file +_cache +_site \ No newline at end of file