Skip to content

Commit a259b5c

Browse files
committed
Enhance GitHub Actions workflow for deployment by adding permissions, concurrency settings, and a build verification step; configure environment for GitHub Pages deployment.
1 parent fac6ef1 commit a259b5c

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,21 @@ on:
66
- main
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
918
jobs:
1019
build-and-deploy:
1120
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
1224

1325
steps:
1426
- name: Checkout
@@ -26,9 +38,21 @@ jobs:
2638
- name: Build site
2739
run: bundle exec jekyll build
2840

41+
- name: Verify build output
42+
run: |
43+
echo "Checking _site directory..."
44+
ls -la _site/ | head -20
45+
echo "Checking for index.html..."
46+
ls -la _site/index.html || echo "WARNING: index.html not found!"
47+
echo "Counting files in _site..."
48+
find _site -type f | wc -l
49+
2950
- name: Deploy to GitHub Pages
51+
id: deployment
3052
uses: peaceiris/actions-gh-pages@v3
3153
with:
3254
github_token: ${{ secrets.GITHUB_TOKEN }}
3355
publish_dir: ./_site
56+
destination_dir: ""
57+
cname: ""
3458

0 commit comments

Comments
 (0)