Skip to content

Commit 38def64

Browse files
authored
Update pages-deploy.yml
1 parent 2d9ad3b commit 38def64

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

.github/workflows/pages-deploy.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,29 @@ on:
44
push:
55
branches:
66
- main
7-
workflow_dispatch:
87

98
jobs:
109
build-and-deploy:
1110
runs-on: ubuntu-latest
1211

1312
steps:
14-
# Inject classic PAT for private submodules
13+
# Configure Git to use personal access token for private submodules
1514
- name: Configure Git for private submodules
1615
run: |
1716
git config --global url."https://${{ secrets.HORSEL_ACCESS }}:@github.com/".insteadOf "https://github.com/"
1817
19-
# Checkout repository without auto submodule update
18+
# Checkout the repository and all submodules
2019
- name: Checkout repository
2120
uses: actions/checkout@v3
2221
with:
23-
fetch-depth: 0
24-
submodules: false
22+
submodules: true
23+
fetch-depth: 0 # ensures full history if needed
2524

26-
# Manually update submodules using PAT
27-
- name: Update submodules
28-
run: |
29-
git submodule sync --recursive
30-
git submodule update --init --recursive
31-
32-
# Deploy to GitHub Pages
25+
# Deploy site to main branch
3326
- name: Deploy to GitHub Pages
3427
uses: peaceiris/actions-gh-pages@v4
3528
with:
3629
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
publish_dir: ./
38-
publish_branch: main
30+
publish_dir: ./ # folder containing site + submodules
31+
publish_branch: main # deploy to main for user page / custom domain
32+
force_orphan: false # keeps branch history intact

0 commit comments

Comments
 (0)