Skip to content

Commit 5a998ea

Browse files
committed
Add GitHub Actions workflow for deploying HonKit site to GitHub Pages
1 parent 3c2edad commit 5a998ea

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy HonKit Site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change this to your main branch if different
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20' # Use your desired Node.js version
19+
20+
- name: Install HonKit
21+
run: npm install -g honkit
22+
23+
- name: Build HonKit site
24+
run: honkit build
25+
26+
- name: Deploy to GitHub Pages
27+
uses: peaceiris/actions-gh-pages@v4
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./_book
31+
# Optional: Customize the branch and directory if needed
32+
publish_branch: gh-pages # Default is gh-pages
33+
# cname: yourdomain.com # Add a custom domain

0 commit comments

Comments
 (0)