name: docs-ci 

on:
  workflow_dispatch:
  push:
    branches: 
      - main
    paths:
      - docs/*
      - .github/workflows/docs.yml
      - mkdocs.yml
      - HMI/README.md

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.x
      - run: pip install mkdocs-material mkdocs-video markdown-include
      - run: cp HMI/README.md docs/hmi-serial-protocol.md
      - run: mkdocs gh-deploy --force
