From 2c5b46830669af4a5142c44e887191339e8431f9 Mon Sep 17 00:00:00 2001 From: minikin Date: Wed, 13 Nov 2024 16:16:29 +0100 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0332bc0..0bbd082 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,6 +28,15 @@ jobs: - name: Build site run: dart run bin/main.dart + - name: Check build directory before setup + run: | + echo "Current directory:" + pwd + echo "Directory contents:" + ls -la + echo "Build directory contents:" + ls -la build || echo "Build directory not found" + - name: Setup Pages uses: actions/configure-pages@v4 @@ -36,7 +45,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: github-pages - path: ./build + path: build retention-days: 1 - name: Deploy Preview @@ -59,12 +68,29 @@ jobs: body: `🚀 Preview deployment is ready!\nURL: ${preview_url}` }) + - name: Check build directory before production upload + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + run: | + echo "Current directory:" + pwd + echo "Directory contents:" + ls -la + echo "Build directory contents:" + ls -la build || echo "Build directory not found" + - name: Upload Production Artifact if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: actions/upload-pages-artifact@v3 with: name: github-pages - path: ./build + path: build + if-no-files-found: error + + - name: List artifacts after upload + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + run: | + echo "Artifacts in runner:" + find /home/runner/work -name "github-pages*" - name: Deploy Production if: github.event_name == 'push' && github.ref == 'refs/heads/main'