From ef1d11238e12e1dfaa500829f463eb424fa6a70c Mon Sep 17 00:00:00 2001 From: Brian Alexander <824344+ironprogrammer@users.noreply.github.com> Date: Fri, 24 Oct 2025 16:50:39 -0700 Subject: [PATCH] Deploy: publish only needed files - index.html - swim_time_standards.json --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1bc3556..df072be 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ permissions: concurrency: group: "pages" - cancel-in-progress: false + cancel-in-progress: true jobs: deploy: @@ -25,13 +25,31 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Verify required files exist + run: | + for f in index.html swim_time_standards.json; do + if [ ! -f "$f" ]; then + echo "::error ::Required file '$f' not found. Aborting deployment." + exit 1 + fi + done + + - name: Prepare publish directory + run: | + rm -rf .publish + mkdir -p .publish + cp index.html .publish/ + cp swim_time_standards.json .publish/ + # show what will be published (helpful in logs) + ls -la .publish + - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: '.' + path: .publish - name: Deploy to GitHub Pages id: deployment