Skip to content

Commit

Permalink
Merge pull request #1 from anton-rs/rf/feat/gh-pages
Browse files Browse the repository at this point in the history
feat: gh-pages
  • Loading branch information
refcell authored Oct 1, 2024
2 parents 58bb575 + 9bc4017 commit 7b03f66
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/book.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Book Deployment

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
name: Publish to GitHub Pages
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Setup mdbook
run: |
cargo install mdbook mdbook-mermaid mdbook-template
- name: Build book
working-directory: .
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

0 comments on commit 7b03f66

Please sign in to comment.