feat: implement issue 335 to add environments section below package (… #379
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Documentation | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/gh-pages.yaml' | |
- '.github/linkchecker.json' | |
- 'doxygen/**' | |
- 'schema/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/gh-pages.yaml' | |
- '.github/linkchecker.json' | |
- 'doxygen/**' | |
jobs: | |
docs: | |
name: Build main documentation | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y graphviz plantuml libclang1-9 libclang-cpp1-9 | |
- name: Install doxygen 1.9.2 | |
run: | | |
wget -O doxygen.tgz https://sourceforge.net/projects/doxygen/files/rel-1.9.2/doxygen-1.9.2.linux.bin.tar.gz/download | |
sudo tar -C /opt -xf doxygen.tgz | |
sudo ln -s /opt/doxygen-1.9.2/bin/doxygen /usr/local/bin/ | |
which doxygen | |
doxygen --version | |
- name: Install linkchecker | |
run: | | |
sudo pip install LinkChecker | |
- name: Generate doxygen | |
run: | | |
echo "::add-matcher::.github/doxygen.json" | |
doxygen/gen_doc.sh | |
echo "::remove-matcher owner=doxygen::" | |
- name: Run linkchecker | |
run: | | |
echo "::add-matcher::.github/linkchecker.json" | |
doxygen/check_links.sh doc/index.html | |
echo "::remove-matcher owner=linkchecker::" | |
- name: Archive documentation | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation | |
path: doc/ | |
retention-days: 1 | |
if-no-files-found: error | |
- name: Archive documentation | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
run: | | |
cd doc | |
tar -cvjf /tmp/doc.tbz2 . | |
- uses: actions/checkout@v4 | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
with: | |
ref: gh-pages | |
- name: Publish documentation | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
run: | | |
rm -rf main | |
mkdir main | |
cd main | |
tar -xvjf /tmp/doc.tbz2 | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "Update main documentation" | |
git push |