name: fslock CI - GH Pages
on: 
  push:
    branches:
      - master

jobs:
  docs:
    name: Documentation
    runs-on: ubuntu-latest
    env:
      RUST_BACKTRACE: 1
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - name: Run cargo doc
        uses: actions-rs/cargo@v1
        with:
          command: doc
          args: --all-features

      - name: Deploy Docs
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./target/doc
