name: Doxygen

on:
  release:
    types: [released]

permissions:
  contents: write

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - name: deps
      run: sudo apt-get install libgcrypt20-dev xa65 doxygen graphviz
    - uses: actions/checkout@v7
      with:
        submodules: 'true'
        ref: ${{ github.ref }}
    - name: bootstrap
      run: autoreconf -vfi
    - name: configure
      run: ./configure
    - name: make doc
      run: make doc
    - name: Deploy
      uses: peaceiris/actions-gh-pages@v4
      with:
        publish_dir: ./docs/html
        destination_dir: html
        commit_message: Update docs
        github_token: ${{ secrets.GITHUB_TOKEN }}
