landlock 0.4.4

Landlock LSM helpers
Documentation
name: GitHub Pages

on:
  push:
    branches: [ main ]

  workflow_dispatch:

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    if: github.repository == 'landlock-lsm/rust-landlock'
    runs-on: ubuntu-24.04

    env:
      CARGO_TERM_COLOR: always

    permissions:
      contents: read
      id-token: write

    steps:
    - uses: actions/checkout@v3

    - name: Install Rust stable
      run: |
        rm ~/.cargo/bin/{cargo-fmt,rustfmt} || :
        rustup default stable
        rustup update

    - name: Build documentation
      run: rustup run stable cargo doc --no-deps

    - name: Add index
      run: |
        echo '<meta http-equiv="refresh" content="0; url=landlock">' > target/doc/index.html

    - name: Upload artifact
      uses: actions/upload-pages-artifact@v3
      with:
        path: target/doc

  deploy:
    needs: build
    runs-on: ubuntu-24.04
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}

    permissions:
      pages: write
      id-token: write

    steps:
      - name: Deploy to GitHub Pages
        uses: actions/deploy-pages@v4