Skip to content

build(deps): bump actions/download-artifact from 4 to 5 #506

build(deps): bump actions/download-artifact from 4 to 5

build(deps): bump actions/download-artifact from 4 to 5 #506

Workflow file for this run

name: docs

Check failure on line 1 in .github/workflows/docs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docs.yml

Invalid workflow file

(Line: 20, Col: 15): Expected format {org}/{repo}[/path]@ref. Actual 'dtolnay/rust-toolchain'
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain
with:
toolchain: nightly
- name: Fetch dependencies and patch generic-array
run: |
# Fetch dependencies first to download the crates
cargo fetch
# Now patch crates that use doc_auto_cfg
# Patch generic-array crate
find ~/.cargo/registry/src -name "lib.rs" -path "*/generic-array-*/src/lib.rs" -exec \
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
# Patch getrandom crate
find ~/.cargo/registry/src -name "lib.rs" -path "*/getrandom-*/src/lib.rs" -exec \
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
# Patch winnow crate (remove doc_auto_cfg line entirely since it already has doc_cfg)
find ~/.cargo/registry/src -name "lib.rs" -path "*/winnow-*/src/lib.rs" -exec \
sed -i '/doc_auto_cfg/d' {} \; || true
# Patch toml_datetime crate
find ~/.cargo/registry/src -name "lib.rs" -path "*/toml_datetime-*/src/lib.rs" -exec \
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
# Patch toml_edit crate
find ~/.cargo/registry/src -name "lib.rs" -path "*/toml_edit-*/src/lib.rs" -exec \
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
- env:
RUSTFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg docsrs
run: cargo doc --package oo7 --features "unstable" --no-deps
- name: Fix permissions
run: |
chmod -c -R +rX "target/doc/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload docs artifact
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: docs-reports
path: ./target/doc/
retention-days: 30