Skip to content

add 1

add 1 #9

name: Documentation
on:
push:
branches:
- workflow_imp_2
pull_request:
branches:
- '*'
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install sphinx-toolbox
pip install sphinx myst_parser
sudo apt-get install doxygen graphviz -y
- name: Sphinx build
run: |
pushd doc/sphinx
sphinx-build ./ build
popd
echo "Sphinx was generated successfully!"
- name: Store the generated doc
uses: actions/upload-artifact@v4
with:
name: html-sphinx
path: doc/sphinx/build
- name: Doxygen build
run: |
pushd doc/doxygen
mkdir -p build
cd build
cmake ../
doxygen doxygen_doc/Doxyfile.doxy
cd ..
popd
echo "Doxygen was generated successfully!"
- name: Store the generated doc
uses: actions/upload-artifact@v4
with:
name: html-doxygen
path: doc/doxygen/build/html
deploy-doc:
runs-on: ubuntu-latest
needs: docs

Check failure on line 55 in .github/workflows/documentation.yaml

View workflow run for this annotation

GitHub Actions / Documentation

Invalid workflow file

The workflow is not valid. .github/workflows/documentation.yaml (Line: 55, Col: 12): Job 'deploy-doc' depends on unknown job 'docs'.
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
with:
ref: 'gh-pages'
- name: Empty gh-pages
run: |
git rm -r . --quiet
- uses: actions/download-artifact@v4
with:
name: html-sphinx
- uses: actions/download-artifact@v4
with:
name: html-doxygen
path: doxygen
- name: Patch doc build
run: |
touch .nojekyll
- name: Commit gh-pages
run: |
author=$(git log -1 --pretty=format:'%an')
email=$(git log -1 --pretty=format:'%ae')
commit=$(git rev-parse --short HEAD)
git add . >> /dev/null
git config --global user.name "$author"
git config --global user.email "$email"
git commit -m "deploy: $commit" --allow-empty
- name: Push to gh-pages
run: >-
git push origin gh-pages:gh-pages