Skip to content

Commit 6314b54

Browse files
authored
Add CNAME copy step in GitHub Pages workflow
Added step to copy CNAME file to book directory before deployment.
1 parent 2068987 commit 6314b54

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/gh-pages.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ jobs:
1717
- name: Setup mdBook
1818
uses: peaceiris/actions-mdbook@v1
1919
with:
20-
mdbook-version: '0.5.0-beta.1' # 建议指定一个稳定版本
20+
mdbook-version: '0.5.0-beta.1'
2121

2222
- name: Build with mdBook
2323
run: |
2424
mdbook clean
2525
mdbook build
26+
27+
- name: Copy CNAME to book directory
28+
run: cp CNAME ./book/CNAME
2629

2730
- name: Deploy to GitHub Pages
2831
uses: peaceiris/actions-gh-pages@v3
2932
with:
3033
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
publish_dir: ./book
34+
publish_dir: ./book

0 commit comments

Comments
 (0)