]> git.otsuka.systems Git - cotsuka.github.io/commitdiff
add concurrency control, dependency caching, manual workflow runs, add back restore...
authorCameron Otsuka <cameron@otsuka.haus>
Mon, 29 Dec 2025 20:18:28 +0000 (12:18 -0800)
committerCameron Otsuka <cameron@otsuka.haus>
Mon, 29 Dec 2025 20:18:28 +0000 (12:18 -0800)
.github/workflows/deploy-to-ghpages.yml

index 3bafc7358c2459a287971f8fd4b8c04057b6f854..24b4f8bc5e4d6cc13dec1061a4863f9fd3839ff7 100644 (file)
@@ -1,9 +1,14 @@
 name: Deploy to GitHub Pages
 
+concurrency:
+  cancel-in-progress: true
+  group: pages
+
 on:
   push:
     branches:
       - main
+  workflow_dispatch:
 
 jobs:
   build:
@@ -15,6 +20,14 @@ jobs:
 
       - uses: oven-sh/setup-bun@v2
 
+      - name: Restore bun dependency cache
+        uses: actions/cache@v5
+        with:
+          path: node_modules/
+          key: bun-${{ hashFiles('bun.lock') }}
+          restore-keys: |
+            bun-
+
       - name: Install dependencies
         run: bun install --frozen-lockfile
 
@@ -29,12 +42,16 @@ jobs:
         with:
           path: .astro-cache/assets/
           key: astro-images-${{ hashFiles('src/assets/**/*', 'content/**/*.gif', 'content/**/*.jpg', 'content/**/*.png', 'content/**/*.svg', 'content/**/*.webp') }}
+          restore-keys: |
+            astro-images-
 
       - name: Restore OpenGraph image cache
         uses: actions/cache@v5
         with:
           path: .og-cache/
           key: og-images-${{ hashFiles('content/**/*.md', 'content/**/*.mdx') }}
+          restore-keys: |
+            og-images-
 
       - name: Build
         run: bun run build