update docs workflow

This commit is contained in:
gab-k committed 2024-11-27 22:33:06 +01:00
1 parent c0f61511ce
commit 251d71e73f
2 files changed
+37 -24

No files matched your search

@@ -7,31 +7,47 @@ on:
- main # Trigger on push to 'main' 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: jobs:
# This workflow contains a single job called "build"
doxy-build: doxy-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Check out the repo
- uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Doxygen Action - name: Doxygen build
uses: mattnotmitt/doxygen-action@v1.1.0 uses: mattnotmitt/doxygen-action@v1.9.5
with: with:
# Path to Doxyfile # Path to Doxyfile
doxyfile-path: "./Doxyfile" # default is ./Doxyfile doxyfile-path: 'docs/doxygen'
# Working directory
working-directory: "." # default is .
- name: Upload doxygen files as artifact - name: Upload doxygen files as artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: doxygen_files name: doxygen_files
path: html/ path: build/xml/
sphinx-build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Download doxygen files artifact
uses: actions/download-artifact@v4
with:
name: doxygen_files
path: 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: build/
deploy-main: deploy-main:
if: github.ref == 'refs/heads/main' # Only deploy on 'main' branch if: github.ref == 'refs/heads/main' # Only deploy on 'main' branch
@@ -39,21 +55,19 @@ jobs:
needs: doxy-build needs: doxy-build
steps: steps:
- name: Download doxygen files artifact - name: Download sphinx files artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: doxygen_files name: sphinx_files
path: html/ path: docs/sphinx
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
# Default Doxyfile build documentation to html directory.
# Change the directory if changes in Doxyfile
publish_dir: ./html publish_dir: ./html
publish_branch: gh-pages publish_branch: gh-pages
destination_dir: html destination_dir: docs/sphinx/build
deploy-dev: deploy-dev:
if: github.ref == 'refs/heads/dev' # Only deploy on 'dev' branch if: github.ref == 'refs/heads/dev' # Only deploy on 'dev' branch
@@ -64,15 +78,13 @@ jobs:
- name: Download doxygen files artifact - name: Download doxygen files artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: doxygen_files name: sphinx_files
path: html/ path: docs/sphinx
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
# Default Doxyfile build documentation to html directory.
# Change the directory if changes in Doxyfile
publish_dir: ./html publish_dir: ./html
publish_branch: gh-pages-dev # Specify the target branch (gh-pages-dev in this case) publish_branch: gh-pages-dev # Specify the target branch (gh-pages-dev in this case)
destination_dir: html destination_dir: docs/sphinx/build
+1
View File
@@ -0,0 +1 @@
sphinx-rtd-theme==3.0.2