Files
RP2040-Decoder/.github/workflows/doxygen-gh-pages.yml
T

79 lines
2.3 KiB
YAML

name: Doxygen Action
on:
push:
branches:
- dev # Trigger on push to 'dev' branch
- main # Trigger on push to 'main' branch
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
doxy-build:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Doxygen Action
uses: mattnotmitt/doxygen-action@v1.1.0
with:
# Path to Doxyfile
doxyfile-path: "./Doxyfile" # default is ./Doxyfile
# Working directory
working-directory: "." # default is .
- name: Upload doxygen files as artifact
uses: actions/upload-artifact@v4
with:
name: doxygen_files
path: html/
deploy-main:
if: github.ref == 'refs/heads/main' # Only deploy on 'main' branch
runs-on: ubuntu-latest
needs: doxy-build
steps:
- name: Download doxygen files artifact
uses: actions/download-artifact@v4
with:
name: doxygen_files
path: html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Default Doxyfile build documentation to html directory.
# Change the directory if changes in Doxyfile
publish_dir: ./html
publish_branch: gh-pages
destination_dir: html
deploy-dev:
if: github.ref == 'refs/heads/dev' # Only deploy on 'dev' branch
runs-on: ubuntu-latest
needs: doxy-build
steps:
- name: Download doxygen files artifact
uses: actions/download-artifact@v4
with:
name: doxygen_files
path: html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Default Doxyfile build documentation to html directory.
# Change the directory if changes in Doxyfile
publish_dir: ./html
publish_branch: gh-pages-dev # Specify the target branch (gh-pages-dev in this case)
destination_dir: html