-
Notifications
You must be signed in to change notification settings - Fork 593
59 lines (49 loc) · 2.09 KB
/
docs.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
name: Generate documentation
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
jobs:
ci:
name: Build Doxygen documentation
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
with:
use_ccache: false
- name: Install awscli
run: brew install awscli || true
- name: Install doxygen and graphviz (a dependency of Doxygen for generating diagrams)
run: brew install doxygen graphviz || true
- name: Generate Doxygen Documentation for Slice
working-directory: ./doxygen
run: doxygen
- name: Generate Doxygen Documentation for C++
working-directory: ./cpp
run: |
make generate-srcs
cd doxygen
doxygen
# This will perform a full sync of the documentation to S3 every time the workflow is run since
# the timestamps will always be different. Using --size-only is not sufficient since the
# documentation may be updated without changing the size of the files. S3 does not offer a hash based sync.
#
# Additionally, we do not cache the doxygen output since it does not remove files old files.
- name: Sync Documentation to S3
run: |
aws s3 sync ./doxygen/slice s3://${AWS_S3_DOC_BUCKET}/api/ice/main/slice --delete
aws s3 cp ./doxygen/slice.tag s3://${AWS_S3_DOC_BUCKET}/api/ice/main/slice.tag
aws s3 sync ./cpp/doxygen/cpp s3://${AWS_S3_DOC_BUCKET}/api/ice/main/cpp --delete
aws s3 cp ./cpp/doxygen/icecpp.tag s3://${AWS_S3_DOC_BUCKET}/api/ice/main/icecpp.tag
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_DOC_BUCKET: ${{ secrets.AWS_S3_DOC_BUCKET }}
AWS_DEFAULT_REGION: us-east-1
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'