python Polars 1.8.0 (#18856) #103
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: Build Rust documentation | |
on: | |
pull_request: | |
paths: | |
- crates/** | |
- .github/workflows/docs-rust.yml | |
push: | |
branches: | |
- main | |
paths: | |
- crates/** | |
- .github/workflows/docs-rust.yml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build-rust-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Rust | |
run: rustup component add rust-docs | |
- name: Cache Rust | |
uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.ref_name == 'main' }} | |
- name: Build Rust documentation | |
env: | |
RUSTDOCFLAGS: --cfg docsrs -D warnings --allow=rustdoc::redundant-explicit-links | |
working-directory: crates | |
run: make doctest | |
- name: Create redirect to Polars crate and set no-jekyll | |
if: ${{ github.ref_name == 'main' }} | |
run: | | |
echo '<meta http-equiv=refresh content=0;url=polars/index.html>' > target/doc/index.html | |
touch target/doc/.nojekyll | |
- name: Deploy Rust docs | |
if: ${{ github.ref_name == 'main' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: target/doc | |
target-folder: api/rust/dev | |
single-commit: true | |
# Make sure documentation artifacts are not cached | |
- name: Clean up documentation artifacts | |
if: ${{ github.ref_name == 'main' }} | |
run: rm -rf target/doc |