Skip to content

refactor: switch to quick_xml library #375

refactor: switch to quick_xml library

refactor: switch to quick_xml library #375

Workflow file for this run

name: Docs
on:
push:
branches: [main]
paths:
- docs/**
- .github/workflows/build-docs.yml
- cpp-linter/src/**
- '*.md'
- '*/*.md'
pull_request:
branches: [main]
paths:
- docs/**
- .github/workflows/build-docs.yml
- cpp-linter/src/**
- '*.md'
- '*/*.md'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
cache-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update --no-self-update
- name: Cache .cargo locked resources
uses: actions/cache@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch
build-mkdocs:
runs-on: ubuntu-latest
needs: [cache-deps]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Cache .cargo locked resources
uses: actions/cache/restore@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: 'pip'
cache-dependency-path: docs/requirements.txt
- name: Install workflow deps
run: |
pip install -r docs/requirements.txt
pip install --force-reinstall -v docs/
- name: Build docs
working-directory: docs
run: mkdocs build
- name: Upload docs build as artifact
uses: actions/upload-artifact@v4
with:
name: cpp-linter-docs
path: docs/site
- name: Upload to github pages
# only publish doc changes from main branch
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/site
build-rustdoc:
runs-on: ubuntu-latest
needs: [cache-deps]
steps:
- uses: actions/checkout@v4
- run: rustup update --no-self-update
- name: Cache .cargo locked resources
uses: actions/cache/restore@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just
- run: just docs-rs
- name: upload rustdoc build as artifact
uses: actions/upload-artifact@v4
with:
path: target/doc
name: cpp-linter-api_docs