name: publish
on:
  release:
    types: [published]
jobs:
  deploy:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: set version
        run: echo "PROJECT_NUMBER = `git describe --tags`" >> Doxyfile
      - name: Generate Documentation
        uses: mattnotmitt/doxygen-action@edge
      - name: Publish generated content to GitHub Pages
        uses: tsunematsu21/actions-publish-gh-pages@v1.0.2
        with:
          dir: docs/html
          branch: gh-pages
          token: ${{ secrets.ACCESS_TOKEN }}