extern-trait 0.4.3

Opaque types for traits using static dispatch
Documentation
name: Docs

on:
  push:
    branches:
      - main
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

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

env:
  RUST_BACKTRACE: 1

defaults:
  run:
    shell: bash

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@nightly
      - name: Build docs
        run: cargo doc --all-features --no-deps
        env:
          RUSTDOCFLAGS: --cfg docsrs
      - name: Add redirect
        run: echo '<meta http-equiv="refresh" content="0;url=extern_trait/index.html">' > target/doc/index.html
      - name: Fix permissions
        run: |
          chmod -c -R +rX target/doc/ | while read line; do
            echo "::warning title=Invalid file permissions automatically fixed::$line"
          done
      - uses: actions/configure-pages@v5
      - uses: actions/upload-pages-artifact@v4
        with:
          path: target/doc

  deploy:
    runs-on: ubuntu-latest
    needs: build
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - id: deployment
        uses: actions/deploy-pages@v4