Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
- name: Build documentation
env:
RUSTDOCFLAGS: -D rustdoc::broken_intra_doc_links -D missing-docs
run: cargo doc --no-deps --target ${{ matrix.target }} --all-features
run: cargo doc --no-deps --target ${{ matrix.target }} --all-features
23 changes: 20 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,30 @@ jobs:
env:
RUSTDOCFLAGS: -D rustdoc::broken_intra_doc_links -D missing-docs
run: |
# Build documentation
cargo doc --no-deps --all-features
printf '<meta http-equiv="refresh" content="0;url=%s/index.html">' $(cargo tree | head -1 | cut -d' ' -f1) > target/doc/index.html

# Auto-detect documentation directory
# Check if doc exists in target/doc or target/*/doc
if [ -d "target/doc" ]; then
DOC_DIR="target/doc"
else
# Find doc directory under target/*/doc pattern
DOC_DIR=$(find target -type d -name doc -path "target/*/doc" | head -n 1)
if [ -z "$DOC_DIR" ]; then
echo "Error: Could not find documentation directory"
exit 1
fi
fi

echo "Documentation found in: $DOC_DIR"
printf '<meta http-equiv="refresh" content="0;url=%s/index.html">' $(cargo tree | head -1 | cut -d' ' -f1) > "${DOC_DIR}/index.html"
echo "DOC_DIR=${DOC_DIR}" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc
path: ${{ env.DOC_DIR }}

deploy:
name: Deploy to GitHub Pages
Expand All @@ -106,4 +123,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ jobs:
run: cargo publish --dry-run

- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
# - name: Run doc tests
# run: cargo test --target ${{ matrix.target }} --doc
- name: Run tests
run: echo "Tests are skipped!"
run: echo "Tests are skipped!"