From 510bbcd66060b33eb5f7b41aef10d7f53439a022 Mon Sep 17 00:00:00 2001 From: Maxwell Brown Date: Wed, 17 Dec 2025 08:39:34 -0500 Subject: [PATCH 1/4] add preview job --- .github/workflows/preview.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 000000000..3e177e405 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,37 @@ +name: Preview Deployment + +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: {} + +jobs: + preview: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install dependences + uses: ./.github/actions/setup + with: + working-directory: ./content + + - name: Build + shell: bash + working-directory: ./content + run: pnpm build + + - name: Cache Astro Output + uses: actions/cache@v4 + with: + path: node_modules/.astro + key: astro-image-cache-${{ hashFiles('src/content/**') }} From 6f0b6292116873b7a2845ace916c04f23f67c1bd Mon Sep 17 00:00:00 2001 From: Maxwell Brown Date: Wed, 17 Dec 2025 09:55:04 -0500 Subject: [PATCH 2/4] fix cache name --- .github/workflows/preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 3e177e405..4fc105ec6 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -34,4 +34,4 @@ jobs: uses: actions/cache@v4 with: path: node_modules/.astro - key: astro-image-cache-${{ hashFiles('src/content/**') }} + key: astro-cache-${{ hashFiles('src/content/**') }} From dd03c2d8967ae3ce94b7e276e4e15561fd8b4b51 Mon Sep 17 00:00:00 2001 From: Maxwell Brown Date: Wed, 17 Dec 2025 09:57:53 -0500 Subject: [PATCH 3/4] reorder cache step --- .github/workflows/preview.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 4fc105ec6..ab6f4fc01 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -18,7 +18,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 + + - name: Cache Astro Output + uses: actions/cache@v4 + with: + path: content/node_modules/.astro + key: astro-cache-${{ hashFiles('src/content/**') }} - name: Install dependences uses: ./.github/actions/setup @@ -29,9 +35,3 @@ jobs: shell: bash working-directory: ./content run: pnpm build - - - name: Cache Astro Output - uses: actions/cache@v4 - with: - path: node_modules/.astro - key: astro-cache-${{ hashFiles('src/content/**') }} From 331cebef5e9822efa2c80bea25bc02938e725bee Mon Sep 17 00:00:00 2001 From: Maxwell Brown Date: Wed, 17 Dec 2025 11:17:14 -0500 Subject: [PATCH 4/4] add restore keys --- .github/workflows/preview.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index ab6f4fc01..becf889a3 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -24,7 +24,9 @@ jobs: uses: actions/cache@v4 with: path: content/node_modules/.astro - key: astro-cache-${{ hashFiles('src/content/**') }} + key: astro-cache-${{ hashFiles('content/src/content/**') }} + restore-keys: | + astro-cache- - name: Install dependences uses: ./.github/actions/setup