Update generate_documentation.yml #595
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
# From: https://github.com/nullromo/doxygen-example/blob/main/.github/workflows/main.yml | |
name: Doxygen Action | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
jobs: | |
build_doxygen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add ``` to Svelte files From ChatGPT | |
run: | | |
find ./app/admin_panel -type f -name '*.svelte' -print0 | | |
while IFS= read -r -d '' file; do | |
sed -i "1i\```" "$file" | |
echo '```' >> "$file" | |
done | |
- name: Build Doxygen documentation for Admin Panel | |
uses: mattnotmitt/[email protected] | |
with: | |
doxyfile-path: "./Doxyfile" | |
working-directory: "./app/admin_panel" | |
- name: Build Doxygen documentation for Raspberry Pi | |
uses: mattnotmitt/[email protected] | |
with: | |
doxyfile-path: "./Doxyfile" | |
working-directory: "./app/rpi" | |
- name: Build Doxygen documentation for Other Code Projects | |
uses: mattnotmitt/[email protected] | |
with: | |
doxyfile-path: "./Doxyfile" | |
working-directory: "./app/other" | |
- name: Move Admin Panel Doxygen HTML files | |
run: | | |
sudo mv docs/admin_panel/html/* docs/admin_panel | |
- name: Move Raspberry Pi Doxygen HTML files | |
run: | | |
sudo mv docs/raspberry_pi/html/* docs/raspberry_pi | |
- name: Move Other Doxygen HTML files | |
run: | | |
sudo mv docs/other/html/* docs/other | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
build_doxygen_pdf: | |
needs: build_doxygen | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: gh-pages | |
- name: Generate Doxygen PDF | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y doxygen-latex | |
cd admin_panel/latex | |
sudo make | |
cd ../.. | |
cd raspberry_pi/latex | |
sudo make | |
cd ../.. | |
cd other/latex | |
sudo make | |
- name: Commit PDF | |
uses: mikeal/publish-to-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: 'gh-pages' |