name: Pages

on:
  push:
    branches:
      - master

jobs:
  pages:

    runs-on: ubuntu-latest

    steps:
    - name: Checkout sources
      uses: actions/checkout@v3
      with:
        submodules: recursive
    - name: Build documentation
      run: cargo doc --verbose --features tokio,winit
    - name: Deploy documentation
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./target/doc
