Skip to content

Commit 0077084

Browse files
ci(pages): survive the cold casket-ssg build so the site can ever deploy (#77)
Every Pages run since the workflow existed was cancelled: the cold GHC 9.8.2 cabal build of casket-ssg exceeds the 15-minute job timeout, and a timed-out job never runs the cache post-step, so the next run was cold again — a self-perpetuating timeout (0 successful deploys, site 404). - build job timeout 15 -> 60 min for the cache-priming run - split actions/cache into restore + always()-guarded save so progress is kept even if a build fails or times out Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 5a8e3c8 commit 0077084

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/casket-pages.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ concurrency:
1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
17-
timeout-minutes: 15
17+
# Cold cabal build of casket-ssg (GHC 9.8.2) exceeds 15 minutes, and a
18+
# timed-out job never saves its cache, so every run stayed cold. 60 min
19+
# covers the cache-priming build; warm runs take ~2-3 min.
20+
timeout-minutes: 60
1821
steps:
1922
- name: Checkout
2023
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
@@ -28,8 +31,9 @@ jobs:
2831
with:
2932
ghc-version: '9.8.2'
3033
cabal-version: '3.10'
31-
- name: Cache Cabal
32-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
34+
- name: Restore Cabal cache
35+
id: cabal-cache
36+
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
3337
with:
3438
path: |
3539
~/.cabal/packages
@@ -39,6 +43,17 @@ jobs:
3943
- name: Build casket-ssg
4044
working-directory: .casket-ssg
4145
run: cabal build
46+
# Save even if the build step failed or timed out, so partial compilation
47+
# progress carries into the next run instead of restarting cold.
48+
- name: Save Cabal cache
49+
if: always() && steps.cabal-cache.outputs.cache-hit != 'true'
50+
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
51+
with:
52+
path: |
53+
~/.cabal/packages
54+
~/.cabal/store
55+
.casket-ssg/dist-newstyle
56+
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
4257
- name: Prepare site source
4358
shell: bash
4459
run: |

0 commit comments

Comments
 (0)