chore: Remove deployment step for GitHub Pages from workflow #8
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 Documentation | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "logguard/**" | ||
| - ".github/workflows/deploy-docs.yml" | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: write | ||
| pages: write | ||
| id-token: write | ||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
| env: | ||
| PYTHON_VERSION: "3.12" | ||
| ARTIFACTS_DIR: build | ||
| jobs: | ||
| # ───────────────────────────────────────────────────────────────── | ||
| # Build Documentation | ||
| # ───────────────────────────────────────────────────────────────── | ||
| build-docs: | ||
| name: Build Documentation | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
| cache: 'pip' | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -e ".[dev]" | ||
| - name: Generate documentation | ||
| run: | | ||
| mkdir -p ${{ env.ARTIFACTS_DIR }}/docs | ||
| pdoc logguard -o ${{ env.ARTIFACTS_DIR }}/docs | ||
| echo "Documentation generated at ${{ env.ARTIFACTS_DIR }}/docs" | ||
| - name: Verify documentation | ||
| run: | | ||
| if [ ! -d "${{ env.ARTIFACTS_DIR }}/docs" ]; then | ||
| echo "ERROR: Documentation not generated!" | ||
| exit 1 | ||
| fi | ||
| if [ ! -f "${{ env.ARTIFACTS_DIR }}/docs/index.html" ]; then | ||
| echo "WARNING: No index.html found, creating redirect..." | ||
| mkdir -p "${{ env.ARTIFACTS_DIR }}/docs" | ||
| fi | ||
| - name: Upload documentation artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: documentation | ||
| path: ${{ env.ARTIFACTS_DIR }}/docs | ||
| retention-days: 7 | ||
| # ───────────────────────────────────────────────────────────────── | ||
| # Notify on Success | ||
| # ───────────────────────────────────────────────────────────────── | ||
| notify: | ||
| name: Notify Success | ||
| runs-on: ubuntu-latest | ||
| needs: [build-docs, deploy-pages] | ||
| if: success() && github.event_name == 'push' | ||
| steps: | ||
| - name: Success notification | ||
| run: | | ||
| echo "✓ Documentation successfully built and deployed!" | ||
| echo "URL: ${{ needs.deploy-pages.outputs.page_url }}" | ||