update README.md #38
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: CI-CD-Doxygen # Workflow name | |
on: | |
push: | |
branches: | |
- main # The workflow will be triggered when there's a push to the 'main' branch | |
jobs: | |
build: # Defines a job named 'build' | |
runs-on: ubuntu-latest # The job will run on the latest available version of Ubuntu | |
steps: # Defines the steps that will be executed in the job | |
- name: Checkout code # First step: checkout the code | |
uses: actions/checkout@v2 # Uses the 'checkout' action version 2 | |
- name: Install Doxygen # Second step: install Doxygen | |
run: sudo apt-get install -y doxygen # Executes the command to install Doxygen | |
- name: Install Graphviz # Third step: install Graphviz | |
run: sudo apt-get install -y graphviz # Executes the command to install Graphviz | |
- name: Clone Doxygen Awesome theme and Mainpage # Fourth step: clone the Doxygen Awesome theme | |
run: | | |
mv figures/mainpage.md src | |
git clone https://github.com/jothepro/doxygen-awesome-css.git doxygen-awesome | |
- name: Build Doxygen documentation # Fifth step: generate Doxygen documentation | |
run: | | |
doxygen -u Doxyfile # Updates the Doxygen configuration file | |
echo "GENERATE_HTML = YES" >> Doxyfile # Enables HTML generation | |
echo "HTML_EXTRA_STYLESHEET = doxygen-awesome/doxygen-awesome.css" >> Doxyfile # Specifies the path to the Doxygen Awesome theme | |
doxygen Doxyfile # Generates the documentation with the updated settings | |
- name: Deploy to GitHub Pages # Sixth step: deploy the documentation to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 # Uses the 'actions-gh-pages' action version 3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} # Uses the GitHub token for authentication | |
publish_dir: ./docs/html # Defines the directory that will be published to GitHub Pages |