aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/mdbook.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/mdbook.yml')
-rw-r--r--.github/workflows/mdbook.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml
new file mode 100644
index 00000000..61253123
--- /dev/null
+++ b/.github/workflows/mdbook.yml
@@ -0,0 +1,31 @@
+name: mdbook publish
+
+on:
+ push:
+ branches:
+ - main:
+ pull_request:
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup mdBook
+ uses: peaceiris/actions-mdbook@v2
+ with:
+ # mdbook-version: '0.4.10'
+ mdbook-version: 'latest'
+
+ - run: mdbook build
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v4
+ if: ${{ github.ref == 'refs/heads/main' }}
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./book
+ destination_dir: ./ref