fix: improve modern diag manager performance (#1634)
[FMS.git] / .github / workflows / github_doc_site.yml
blob43c4d89897171cf7c9fd5e1513fce069fdccc6cf
1 name: Generate and deploy documentation on GH pages
3 # update on releases or when triggered manually(must have write access)
4 on:
5   release:
6     types: [published]
7   workflow_dispatch:
8 jobs:
9   build:
10     runs-on: ubuntu-latest
11     steps:
12       - name: Checkout code
13         uses: actions/checkout@v4
14       - name: Setup repo
15         run: | # do autotool's job for substitutes since we don't need a full build environement
16           mkdir gen_docs
17           sed 's/@abs_top_builddir@\/docs/gen_docs/g' docs/Doxyfile.in > gen_docs/Doxyfile
18           sed -i 's/@abs_top_srcdir@/./g' gen_docs/Doxyfile
19           # grab version number from configure.ac
20           export VER="`awk '/AC_INIT/{getline;print}' configure.ac | cut -d "[" -f2 | cut -d "]" -f1`"
21           sed -i "s/@PACKAGE_VERSION@/$VER/g" gen_docs/Doxyfile
22       - name: Install and run doxygen
23         run: |
24           sudo apt -y install doxygen graphviz
25           doxygen gen_docs/Doxyfile
26       - name: Upload Pages Artifact
27         uses: actions/upload-pages-artifact@v1
28         with:
29           path: 'gen_docs/html'
30   deploy:
31     needs: build
33     # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
34     permissions:
35       pages: write      # to deploy to Pages
36       id-token: write   # to verify the deployment originates from an appropriate source
38     # Deploy to the github-pages environment
39     environment:
40       name: github-pages
41       url: ${{ steps.deployment.outputs.page_url }}
43     # Specify runner + deployment step
44     runs-on: ubuntu-latest
45     steps:
46       - name: Deploy to GitHub Pages
47         id: deployment
48         uses: actions/deploy-pages@v1