-
Notifications
You must be signed in to change notification settings - Fork 5
97 lines (77 loc) · 2.97 KB
/
Doxygen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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: 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