From 5db064cb91c44cdef6f4c4184fd64e120997d649 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Mon, 13 Feb 2023 20:23:17 +0100 Subject: [PATCH 1/2] Improve CI setup Do not fail on pull requests, properly cache dependencies --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8cfc8c99..c993534e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,8 @@ jobs: name: Cache ~/.stack with: path: ~/.stack - key: ${{ runner.os }}-${{ matrix.ghc }}-stack + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- - name: Build dependencies run: stack build --system-ghc --only-dependencies @@ -51,8 +52,9 @@ jobs: - name: Build site executable run: stack build --system-ghc - # Runs a set of commands using the runners shell - name: Deploy + # No not deploy from pull requests + if: ${{ github.event_name != 'pull_request' }} run: | git config user.name github-actions git config user.email github-actions@github.com From 4cedd91ab000cc1d6625e2682a90059de2a116d1 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Mon, 13 Feb 2023 20:25:55 +0100 Subject: [PATCH 2/2] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c993534e..f6196822 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,7 +53,7 @@ jobs: run: stack build --system-ghc - name: Deploy - # No not deploy from pull requests + # No deploy from pull requests if: ${{ github.event_name != 'pull_request' }} run: | git config user.name github-actions