Skip to content

Commit

Permalink
✨ Add book deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Nov 24, 2023
1 parent 28b8edd commit 34cf323
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/book.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'
- name: Build book
working-directory: ./book
run: mdbook build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book

0 comments on commit 34cf323

Please sign in to comment.