Files
RP2040-Decoder/.github/workflows/docs.yml
T
2024-11-27 22:57:43 +01:00

82 lines
2.0 KiB
YAML

name: Doxygen Action
on:
push:
branches:
- dev # Trigger on push to 'dev' branch
- main # Trigger on push to 'main' branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Doxygen build
uses: mattnotmitt/doxygen-action@v1.9.5
with:
# Path to Doxyfile
doxyfile-path: 'docs/doxygen/Doxyfile'
- name: ls
run: ls
- name: ls
run: ls docs
- name: ls
run: ls build
- name: Check if index.xml exists
run: ls -al docs/doxygen/build/xml
- name: Sphinx build
uses: ammaraskar/sphinx-action@0.4
with:
docs-folder: "docs/sphinx/"
- name: Upload sphinx files as artifact
uses: actions/upload-artifact@v4
with:
name: sphinx_files
path: docs/sphinx/
deploy-main:
if: github.ref == 'refs/heads/main' # Only deploy on 'main' branch
runs-on: ubuntu-latest
needs: build
steps:
- name: Download sphinx files artifact
uses: actions/download-artifact@v4
with:
name: sphinx_files
path: docs/sphinx
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
publish_branch: gh-pages
destination_dir: docs/sphinx/build
deploy-dev:
if: github.ref == 'refs/heads/dev' # Only deploy on 'dev' branch
runs-on: ubuntu-latest
needs: build
steps:
- name: Download doxygen files artifact
uses: actions/download-artifact@v4
with:
name: sphinx_files
path: docs/sphinx
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
publish_branch: gh-pages-dev # Specify the target branch (gh-pages-dev in this case)
destination_dir: docs/sphinx/build