Skip to content

Delete CODE_OF_CONDUCT.md #79

Delete CODE_OF_CONDUCT.md

Delete CODE_OF_CONDUCT.md #79

Workflow file for this run

# Licensed under the Apache-2.0 license
name: Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
pages: write
id-token: write
env:
CARGO_TERM_COLOR: always
jobs:
docs:
name: Documentation
# Only run this job on the main branch
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rust-docs
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build documentation
run: cargo doc --all-features --no-deps --workspace
- name: Create index.html redirect for GitHub Pages
run: |
cat > target/doc/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=openprot/">
<title>OpenProt Documentation</title>
</head>
<body>
<p>Redirecting to <a href="openprot/">OpenProt Documentation</a>...</p>
</body>
</html>
EOF
- name: Check for broken links in docs
run: |
cargo install cargo-deadlinks
cargo deadlinks --check-http
continue-on-error: true
- name: Setup Pages
uses: actions/configure-pages@v5
# Upload the 'github-pages' artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./target/doc
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4