Skip to content

Commit 8e8e105

Browse files
Merge pull request #1 from ironprogrammer/deploy-only-index
Deployment workflow test successful.
2 parents 25e7d51 + ef1d112 commit 8e8e105

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
concurrency:
1515
group: "pages"
16-
cancel-in-progress: false
16+
cancel-in-progress: true
1717

1818
jobs:
1919
deploy:
@@ -25,13 +25,31 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v4
2727

28+
- name: Verify required files exist
29+
run: |
30+
for f in index.html swim_time_standards.json; do
31+
if [ ! -f "$f" ]; then
32+
echo "::error ::Required file '$f' not found. Aborting deployment."
33+
exit 1
34+
fi
35+
done
36+
37+
- name: Prepare publish directory
38+
run: |
39+
rm -rf .publish
40+
mkdir -p .publish
41+
cp index.html .publish/
42+
cp swim_time_standards.json .publish/
43+
# show what will be published (helpful in logs)
44+
ls -la .publish
45+
2846
- name: Setup Pages
2947
uses: actions/configure-pages@v4
3048

3149
- name: Upload artifact
3250
uses: actions/upload-pages-artifact@v3
3351
with:
34-
path: '.'
52+
path: .publish
3553

3654
- name: Deploy to GitHub Pages
3755
id: deployment

0 commit comments

Comments
 (0)