Skip to content

doxygen

doxygen #1090

Workflow file for this run

name: doxygen
on:
push:
branches: main
schedule:
- cron: '0 0 * * *'
jobs:
doxygen:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Docker Image for Doxygen
run: |
docker build -f Dockerfile -t itk-doxygen .
- name: Docker Doxygen generation
run: |
docker run --name itk-dox itk-doxygen
mkdir -p artifacts
docker cp itk-dox:/ITKDoxygen.tar.gz artifacts/ITKDoxygen-${GITHUB_SHA}.tar.gz
docker cp itk-dox:/ITKDoxygenXML.tar.gz artifacts/ITKDoxygenXML-${GITHUB_SHA}.tar.gz
- name: Archive Doxygen Artifacts
uses: actions/upload-artifact@v4
with:
name: doxygen
path: |
artifacts/ITKDoxygenXML-*.tar.gz
artifacts/ITKDoxygen-*.tar.gz
- name: Publish to latest GitHub Release
if: github.ref == 'refs/heads/main'
run: |
sudo apt install -y zstd
pushd artifacts
cp ITKDoxygen-*.tar.gz InsightDoxygenDocHtml-latest.tar.gz
gunzip InsightDoxygenDocHtml-latest.tar.gz
zstd -f -10 -T6 --long=31 InsightDoxygenDocHtml-latest.tar -o InsightDoxygenDocHtml-latest.tar.zst
gzip -9 InsightDoxygenDocHtml-latest.tar
cp ITKDoxygenXML-*.tar.gz InsightDoxygenDocXml-latest.tar.gz
gunzip InsightDoxygenDocXml-latest.tar.gz
zstd -f -10 -T6 --long=31 InsightDoxygenDocXml-latest.tar -o InsightDoxygenDocXml-latest.tar.zst
gzip -9 InsightDoxygenDocXml-latest.tar
popd
gh release delete -R InsightSoftwareConsortium/ITKDoxygen --cleanup-tag latest --yes
gh release create latest --notes="ITK Doxygen documentation built from the ITK master branch." --prerelease --title "ITKDoxygen Latest" -R InsightSoftwareConsortium/ITKDoxygen ./artifacts/InsightDoxygen*
env:
GH_TOKEN: ${{ secrets.github_token }}
- name: Trigger ReadTheDocs build
if: github.ref == 'refs/heads/main'
run: |
curl -X POST \
-H "Content-Type: application/json" \
-d '{"token": "${{ secrets.rtd_webhook_secret }}"}' \
"https://readthedocs.org/api/v2/webhook/itkdoxygen/290126/"
- name: Prepare HTML for GitHub Pages
if: github.ref == 'refs/heads/main'
run: |
tar -zxf artifacts/ITKDoxygen-*.tar.gz
touch html/.nojekyll
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: html
retention-days: 7
deploy-gh-pages:
needs: doxygen
runs-on: ubuntu-24.04
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4
# with:
# preview: true <-> currently not available to the public