11name : doxygen_generator
22
33# version: 1.0.0
4- # 1.0.1 # removed the need of secrets for the user e-mail and name.
5- # 1.0.2 # change the tag to only trigger when a -doc is appended to it.
4+ # 1.0.1 # Removed the need of secrets for the user e-mail and name.
5+ # 1.0.2 # Change the tag to only trigger when a -doc is appended to it.
66# 1.0.3 # Update the way the tag is processed in the flow.
7- # 1.0.4 # the page is now published from the main branch regardless of the branch having triggered the flow.
7+ # 1.0.4 # The page is now published from the main branch regardless of the branch having triggered the flow.
8+ # 1.0.5 # The flow will only run specific parts of itself depending on the trigger method
9+ # 1.0.6 # The flow will trigger the push method after the initial trigger if it had been triggered by a tag
810
911on :
1012 push :
@@ -274,7 +276,7 @@ jobs:
274276 path : ${{ env.TEMPORARY_FOLDER }}
275277 enableCrossOsArchive : true
276278
277- publish_html :
279+ publish_html : # The critical steps will only be run if the flow was triggered by a push on the main branch
278280 # environment variables that are for the github pages
279281 environment :
280282 name : github-pages
@@ -292,6 +294,7 @@ jobs:
292294
293295 - name : Get generated documentation
294296 id : html-cache-restore
297+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/heads/')
295298 uses : actions/cache@v4
296299 with :
297300 key : ${{ env.CACHE_KEY_CLEANED }}
@@ -321,7 +324,7 @@ jobs:
321324 id : deployment
322325 uses : actions/deploy-pages@v4
323326
324- export_other_formats_when_present :
327+ export_other_formats_when_present : # The critical steps will only be run if the flow was triggered by a tag.
325328 runs-on : ubuntu-latest
326329 needs : clean_up_generation
327330 if : success()
@@ -518,6 +521,22 @@ jobs:
518521 make_latest : true
519522 token : ${{ secrets.GITHUB_TOKEN }}
520523
524+ - name : Trigger empty push to main
525+ if : startsWith(github.ref, 'refs/tags/')
526+ run : |
527+ git config --global user.name "${GITHUB_ACTOR}"
528+ git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
529+
530+ # Fetch and switch to main
531+ git fetch origin main:main
532+ git checkout main
533+
534+ # Create empty commit
535+ git commit --allow-empty -m "Trigger HTML deployment from tag ${{ github.ref_name }}"
536+
537+ # Push back to main
538+ git push origin main
539+
521540 clean_created_cache :
522541 name : Clear the cache generated during the build time
523542 permissions : write-all
0 commit comments