Release v0.1.6 (#17) #62
This file contains hidden or 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: 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@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| 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@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| 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@v4 | |
| 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@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - 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 }} |