Files
pubky-core/.github/workflows/docs.yml
Miguel Medeiros a74dc347b4 ci: split workflows and improve CI efficiency (#75)
* feat: add parallel PR check workflow

* fix: remove branch restriction for PR check workflow

* fix: suppress clippy warnings for needless lifetimes in CI workflows

* refactor: consolidate Clippy checks and streamline test workflows

* feat: add documentation workflow and remove legacy Rust CI workflow

* feat: trigger PR check workflow on push to main branch

* fix: update test command to use CI profile in PR check workflow

* fix: enhance test command with partitioning and retries for improved performance

* fix: remove partitioning from test command in PR check workflow

* fix: update test job to use matrix strategy for multiple crates

* fix: enhance test command with additional options for better output and error handling

* fix: remove silent mode from test command for clearer output

* fix: add check for existing tests before running in PR check workflow

* fix: add missing fi statement to close if condition in PR check workflow

* fix: improve test command logic to handle no tests found scenario
2025-02-21 16:51:00 -04:00

58 lines
1.3 KiB
YAML

name: Documentation
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache mdbook installation
uses: actions/cache@v2
with:
path: ~/.cargo/bin/mdbook
key: ${{ runner.os }}-mdbook
- name: Cache mdbook-mermaid installation
uses: actions/cache@v2
with:
path: ~/.cargo/bin/mdbook
key: ${{ runner.os }}-mdbook-mermaid
- name: Install mdBook if not installed already
run: |
if [ ! -f ~/.cargo/bin/mdbook ]; then
cargo install mdbook
fi
- name: Install mdBook-mermaid if not installed already
run: |
if [ ! -f ~/.cargo/bin/mdbook-mermaid ]; then
cargo install mdbook-mermaid
fi
- name: Cache mdBook build
id: mdbook-build-cache
uses: actions/cache@v3
with:
path: ./docs/book/
key: ${{ runner.os }}-mdbook-${{ hashFiles('./docs/**') }}
restore-keys: |
${{ runner.os }}-mdbook-
- name: Build the book
if: steps.mdbook-build-cache.outputs.cache-hit != 'true'
run: mdbook build ./docs/
- name: Deploy book to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book/