Skip to content

Commit

Permalink
ci: add gh-page build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BobAnkh committed Oct 30, 2024
1 parent 4db55da commit a80ff39
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: github pages

on:
push:
branches:
- main
paths:
- 'guide/**'
- '.github/workflows/gh-pages.yml'
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: '0.4.40'
# mdbook-version: 'latest'

- run: mdbook build
working-directory: ./guide

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./guide/book

0 comments on commit a80ff39

Please sign in to comment.