# This GitHub Action automatically updates built Doxygen files for Moltres' documentation
# on `https://arfc.github.io/moltres/` every time a new pull request is merged into devel.

name: Doxygen & MooseDocs & Github Pages Action

# Activate on pushes and pull requests into devel
on:
  push:
    branches: [ devel ]
    
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-20.04

    steps:
      - uses: actions/checkout@v2

      # Install MOOSE Conda environment
      - uses: conda-incubator/setup-miniconda@v2
        with:
          python-version: 3.9
          mamba-version: "*"
          channels: conda-forge,https://conda.software.inl.gov/public
          activate-environment: moose-env
      - shell: bash -l {0}
        run: mamba install moose-tools moose-libmesh
      
      # Create/Update MooseDocs files
      - shell: bash -l {0}
        run: |
          cd doc
          ./moosedocs.py generate MoltresApp
      
      # Generate Doxygen output files in ./docs directory using Doxyfile in base directory
      - name: Doxygen Action
        uses: mattnotmitt/doxygen-action@v1
        with:
          working-directory: .
      
      # Merge Doxygen output files in ./docs into gh-pages branch base directory
      - name: GitHub Pages action
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./doc
          commit_message: ${{ github.event.head_commit.message }}


# This GitHub Action automatically updates built Doxygen files for Moltres' documentation
# on `https://arfc.github.io/moltres/` every time a new pull request is merged into devel.

name: Doxygen & MooseDocs & Github Pages Action

# Activate on pushes and pull requests into devel
on:
  push:
    branches: [ devel ]
    
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-20.04

    steps:
      - uses: actions/checkout@v2

      # Install MOOSE Conda environment & update MooseDocs documentation
      - uses: conda-incubator/setup-miniconda@v2
        with:
          python-version: 3.9
          mamba-version: "*"
          channels: conda-forge,https://conda.software.inl.gov/public
          activate-environment: moose-env
      - shell: bash -l {0}
        run: |
          mamba install moose-tools moose-libmesh
          cd doc
          ./moosedocs.py generate MoltresApp
      
      # Generate Doxygen output files in ./docs directory using Doxyfile in base directory
      - name: Doxygen Action
        uses: mattnotmitt/doxygen-action@v1
        with:
          working-directory: .
      
      # Merge Doxygen output files in ./docs into gh-pages branch base directory
      - name: GitHub Pages action
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./doc
          commit_message: ${{ github.event.head_commit.message }}


Use conda in gh-pages action
Use conda in gh-pages action
