Skip to content

Commit

Permalink
ci: github action auto deploy github page
Browse files Browse the repository at this point in the history
  • Loading branch information
liangpinglk committed Jun 13, 2024
1 parent dda11ac commit ac43218
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/gitbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Deploy GitBook

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '6.14.4'

- name: Install GitBook CLI
run: npm install -g gitbook-cli

- name: Install GitBook plugins
run: gitbook install

- name: Build GitBook
run: gitbook build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ docs
deploy.sh
.DS_Store
.idea
_book
5 changes: 5 additions & 0 deletions book.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"intopic-toc"
]
}

0 comments on commit ac43218

Please sign in to comment.