Skip to content

rename test CI; add badges to README #81

rename test CI; add badges to README

rename test CI; add badges to README #81

Workflow file for this run

name: Docs
on: [push, workflow_dispatch]
env:
CARGO_TERM_COLOR: always
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 }}-cargo-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch
build-sphinx:
runs-on: ubuntu-latest
needs: [cache-deps]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
working-directory: cpp-linter-py
run: pip install -r docs/requirements.txt
- name: Cache .cargo locked resources
uses: actions/cache/restore@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: Build docs
working-directory: cpp-linter-py
run: sphinx-build docs docs/_build/html
- name: Upload docs build as artifact
uses: actions/upload-artifact@v4
with:
name: cpp-linter-py_docs
path: cpp-linter-py/docs/_build/html
- 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: cpp-linter-py/docs/_build/html
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 }}-cargo-${{ hashFiles('Cargo.lock') }}
- run: cargo doc --no-deps --manifest-path cpp-linter-lib/Cargo.toml
- name: upload rustdoc build as artifact
uses: actions/upload-artifact@v4
with:
path: target/doc
name: cpp-linter-lib_docs