name: "Verify Witx"

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - master
    paths:
      - 'docs/witx/**'
  pull_request:
    branches:
      - master
    paths:
      - 'docs/witx/**'

jobs:
  gen_doc:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0

    - name: rustup
      run: |
        rustup update stable --no-self-update
        rustup default stable

    - name: generate md from witx       # XXX: md files goes nowhere
      run: ./generate.sh
      working-directory: utils/witx-doc
