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 d68aa42 commit d20d7ff
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ jobs:
- name: Build site
run: dart run bin/main.dart

- name: Debug build directory
run: |
echo "Current directory contents:"
ls -la
echo "Build directory contents:"
ls -la build || echo "Build directory not found"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: build

deploy-production:
Expand All @@ -44,7 +52,6 @@ jobs:
deployments: write
statuses: write
contents: read
actions: read

environment:
name: github-pages
Expand All @@ -55,12 +62,25 @@ jobs:
cancel-in-progress: false

steps:
- name: Setup Pages
- name: Configure Pages
uses: actions/configure-pages@v4

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: github-pages
path: build

- name: Debug downloaded artifact
run: |
echo "Downloaded contents:"
ls -la build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: github-pages

deploy-preview:
needs: build
Expand All @@ -74,7 +94,6 @@ jobs:
deployments: write
statuses: write
contents: read
actions: read

environment:
name: preview
Expand All @@ -85,9 +104,20 @@ jobs:
cancel-in-progress: true

steps:
- name: Configure Pages
uses: actions/configure-pages@v4

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: github-pages
path: build

- name: Deploy Preview
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: github-pages

- name: Add Preview URL Comment
uses: actions/github-script@v6
Expand Down

0 comments on commit d20d7ff

Please sign in to comment.