Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
minikin committed Nov 13, 2024
1 parent 81930fd commit 2c5b468
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -36,7 +45,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ./build
path: build
retention-days: 1

- name: Deploy Preview
Expand All @@ -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'
Expand Down

0 comments on commit 2c5b468

Please sign in to comment.