Skip to content

Commit 64d4681

Browse files
authored
Merge pull request #186 from MoiraeSoftware/copilot/fix-9e1c27c5-b6d0-493b-b78d-51e553ca6f1e
Fix GitHub Pages deployment workflow for Hugo documentation site
2 parents 6805462 + 80c2f45 commit 64d4681

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/gh-pages.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@ on:
55
branches: [master]
66
paths:
77
- 'docs/**'
8+
workflow_dispatch: # Allow manual triggering
89

910
jobs:
1011
deploy:
11-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
13+
# Add permissions for GitHub Pages deployment
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
1218
steps:
13-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
1420
with:
15-
ref: master
16-
submodules: true
17-
fetch-depth: 1
21+
submodules: recursive
22+
fetch-depth: 0
1823

1924
- name: Setup Hugo
2025
uses: peaceiris/actions-hugo@v3
@@ -28,7 +33,7 @@ jobs:
2833

2934
- name: Deploy
3035
uses: peaceiris/actions-gh-pages@v3
31-
if: github.ref == 'refs/heads/master'
36+
if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
3237
with:
3338
commit_message: ${{ github.event.head_commit.message }}
3439
github_token: ${{ secrets.GITHUB_TOKEN }}

docs/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/public/
2-
/resources/_gen/
2+
/resources/_gen/
3+
.hugo_build.lock

0 commit comments

Comments
 (0)