Skip to content

Commit 7008528

Browse files
committed
fix: ensure .nojekyll file is properly deployed to gh-pages branch
- Replace mkdocs gh-deploy with manual git deployment - Ensures .nojekyll file is committed to gh-pages branch - This will prevent Jekyll from processing the MkDocs output
1 parent cd9deb6 commit 7008528

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,26 @@ jobs:
2525
run: |
2626
pip install mkdocs-material mkdocs-git-revision-date-localized-plugin pymdown-extensions mkdocs-mermaid2-plugin
2727
28-
# - name: Generate changelog
29-
# run: git-cliff -c cliff.toml
28+
- name: Configure git
29+
run: |
30+
git config --global user.name "github-actions[bot]"
31+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3032
3133
- name: Build and Deploy
3234
run: |
35+
# Build the site
3336
mkdocs build
37+
38+
# Add .nojekyll to disable Jekyll processing
3439
touch site/.nojekyll
35-
mkdocs gh-deploy --force
40+
41+
# Deploy to gh-pages branch manually to ensure .nojekyll is included
42+
cd site
43+
git init
44+
git add -A
45+
git commit -m "Deploy MkDocs site"
46+
git branch -M gh-pages
47+
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
48+
git push -f origin gh-pages
3649
env:
3750
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)