name: Build and deploy Doxygen to Scripts

on:
  push:
    branches:
      - main

jobs:
  docs:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4

      - uses: mattnotmitt/doxygen-action@v1.12.0
        with:
          working-directory: 'enzyme/'
          doxyfile-path: 'doxygen.cfg'

      - uses: wsmoses/action-deploy-scripts@main
        with:
          locker: 'enzyme-compiler'
          remote: doxygen
          privateKey: ${{ secrets.SCRIPTS_PRIVATE_KEY }}
          rmRemote: true
          local: enzyme/doxygen/html
