-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update Doxygen deployment workflow to trigger on releases and st…
…reamline steps
- Loading branch information
1 parent
3f9ea83
commit 6094b89
Showing
1 changed file
with
21 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,37 @@ | ||
name: Doxygen GitHub Pages Deploy Action | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
doxygen: | ||
generate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.email "guillaume.papineau@epitech.eu" | ||
git config --global user.name "MasterLaplace" | ||
with: | ||
submodules: "true" | ||
|
||
- name: Install Doxygen | ||
run: | | ||
sudo apt-get install doxygen | ||
sudo apt-get update | ||
sudo apt-get install doxygen -y | ||
- name: Generate Doxygen Documentation | ||
- name: Install theme | ||
run: | | ||
doxygen Doxyfile.cfg | ||
git clone https://github.com/jothepro/doxygen-awesome-css.git | ||
cd doxygen-awesome-css | ||
git checkout v2.3.4 | ||
cd .. | ||
- name: Create gh-pages branch | ||
run: | | ||
git branch -D gh-pages || true | ||
git checkout -b gh-pages | ||
- name: Generate Doxygen Documentation | ||
run: doxygen Doxyfile | ||
|
||
- name: Copy documentation to gh-pages branch | ||
run: | | ||
cp -r docs/Flakkari/html/* docs/ | ||
- name: Create .nojekyll file | ||
run: touch docs/html/.nojekyll | ||
|
||
- name: Push documentation to gh-pages branch | ||
run: | | ||
git add . | ||
git commit -m "deploy(root): Deploying documentation to GitHub Pages" | ||
git push origin gh-pages | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: "${{ secrets.GITHUB_TOKEN }}" | ||
publish_dir: ./docs/html |