| 1 |
name: build-documentation |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ master ] |
| 6 |
workflow_dispatch: |
| 7 |
|
| 8 |
permissions: |
| 9 |
contents: read |
| 10 |
pages: write |
| 11 |
id-token: write |
| 12 |
|
| 13 |
concurrency: |
| 14 |
group: "pages" |
| 15 |
cancel-in-progress: false |
| 16 |
|
| 17 |
env: |
| 18 |
BUILD_TYPE: Release |
| 19 |
|
| 20 |
jobs: |
| 21 |
build-and-deploy: |
| 22 |
runs-on: ubuntu-latest |
| 23 |
# env: |
| 24 |
# GIT_AUTHOR_NAME: github-actions[bot] |
| 25 |
# GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com |
| 26 |
# GIT_COMMITTER_NAME: github-actions[bot] |
| 27 |
# GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com |
| 28 |
|
| 29 |
steps: |
| 30 |
- name: Checkout code |
| 31 |
uses: actions/checkout@v6 |
| 32 |
|
| 33 |
- name: Setup Pages |
| 34 |
uses: actions/configure-pages@v6 |
| 35 |
|
| 36 |
- name: Install Doxygen |
| 37 |
run: | |
| 38 |
sudo apt-get update |
| 39 |
sudo apt-get install -y doxygen |
| 40 |
|
| 41 |
- name: Configure CMake |
| 42 |
run: cmake -B "${{github.workspace}}/build" -DPODOFO_BUILD_DOC_ONLY=True |
| 43 |
|
| 44 |
- name: Generate Doxygen Documentation |
| 45 |
run: doxygen "${{github.workspace}}/build/Doxyfile" |
| 46 |
|
| 47 |
- name: Upload artifact |
| 48 |
uses: actions/upload-pages-artifact@v4 |
| 49 |
with: |
| 50 |
path: "${{github.workspace}}/build/doxygen" |
| 51 |
|
| 52 |
deploy: |
| 53 |
needs: build-and-deploy |
| 54 |
runs-on: ubuntu-latest |
| 55 |
environment: |
| 56 |
name: github-pages |
| 57 |
url: ${{steps.deployment.outputs.page_url}} |
| 58 |
steps: |
| 59 |
|
| 60 |
- name: Deploy to GitHub Pages |
| 61 |
id: deployment |
| 62 |
uses: actions/deploy-pages@v5 |