Merge pull request #802 from freenet/dependabot/cargo/tracing-opentel… #299
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Documentation | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Rust | |
uses: ATiltedTree/setup-rust@v1 | |
with: | |
rust-version: stable | |
- name: Cache Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo | |
key: cargo-cache-${{ hashFiles('Cargo.lock') }} | |
- name: Install dependencies | |
run: | | |
cargo install mdbook mdbook-mermaid mdbook-toc | |
- name: Build MDBook | |
run: | | |
if [ -d "docs" ]; then | |
cd docs | |
mdbook build | |
else | |
echo "Docs folder not found." | |
fi | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/book | |
single-commit: true |