Skip to content

fix: add gitleaks configuration to handle test data #78

fix: add gitleaks configuration to handle test data

fix: add gitleaks configuration to handle test data #78

Workflow file for this run

name: Deploy Docs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- name: Install Rust
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6
- name: Cache cargo registry
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
- name: Build Documentation
run: cargo doc --no-deps --workspace --document-private-items
- name: Create index.html
run: |
cat > target/doc/index.html << 'EOF'
<html>
<head>
<title>Code-Guardian Documentation</title>
</head>
<body>
<h1>Code-Guardian Workspace Documentation</h1>
<ul>
<li><a href="code_guardian_cli/index.html">CLI Crate</a></li>
<li><a href="code_guardian_core/index.html">Core Crate</a></li>
<li><a href="code_guardian_output/index.html">Output Crate</a></li>
<li><a href="code_guardian_storage/index.html">Storage Crate</a></li>
</ul>
</body>
</html>
EOF
- name: Setup Pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d
- name: Upload artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b
with:
path: ./target/doc
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
docs-agent:
name: Docs Agent
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- name: Install Rust
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6
- name: Check documentation
run: cargo doc --no-deps --workspace --document-private-items
- name: Comment on PR if docs issues
if: failure()
run: |
gh pr comment $PR_NUMBER --body "Docs agent detected issues in documentation generation."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}