-
Notifications
You must be signed in to change notification settings - Fork 315
94 lines (88 loc) · 3.14 KB
/
Copy pathnightly-upload.yml
File metadata and controls
94 lines (88 loc) · 3.14 KB
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
name: Deploy API Docs
on:
schedule:
# UTC timezone
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
build:
name: 'Build API Docs (${{ matrix.gazebo_distribution }})'
runs-on: ubuntu-latest
container:
image: ubuntu:${{ matrix.ubuntu_distribution }}
strategy:
fail-fast: false
matrix:
include:
- ubuntu_distribution: focal
gazebo_distribution: fortress
- ubuntu_distribution: jammy
gazebo_distribution: harmonic
- ubuntu_distribution: noble
gazebo_distribution: ionic
- ubuntu_distribution: noble
gazebo_distribution: jetty
steps:
- uses: ros-tooling/setup-ros@v0.7
- name: 'Set up Gazebo'
uses: gazebo-tooling/setup-gazebo@v0.3.0
with:
required-gazebo-distributions: ${{ matrix.gazebo_distribution }}
- name: 'Add Doxygen'
run: sudo apt-get install -y doxygen graphviz texlive-latex-extra
- name: 'Add missing dependencies'
run: sudo apt-get install -y libopengl-dev
- name: 'Build Docs'
run: |
mkdir -p ws/src
cd ws/src
vcs import --input https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-${{ matrix.gazebo_distribution}}.yaml
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install $(sort -u $(find . -iname 'packages-'${{ matrix.ubuntu_distribution}}'.apt' -o -iname 'packages.apt' | grep -v '/\.git/') | tr '\n' ' ')
cd ..
colcon build --merge-install --event-handlers console_cohesion+ --cmake-args -DBUILD_DOCS=ON -DBUILD_TESTING=OFF --cmake-target doc
- uses: actions/upload-artifact@v4
if: always()
with:
name: api-docs-${{ matrix.gazebo_distribution }}
path: ws/build/**/doxygen/html
if-no-files-found: 'error'
include-hidden-files: 'true'
upload:
name: Upload docs to production
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
# Allow only one concurrent deployment between this and the deploy workflow.
concurrency:
group: pages
cancel-in-progress: false
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
id: download
with:
path: .api-docs
pattern: api-docs-*
merge-multiple: false
- run: python3 tools/restructure_doxygen_artifacts.py --input ${{steps.download.outputs.download-path}} .api-out
- name: Deduplicate files
run: |
sudo apt-get install -y rdfind symlinks
bash tools/deduplicate_files.sh .api-out
- uses: actions/upload-artifact@v4
with:
name: api-docs
path: .api-out/*
if-no-files-found: 'error'
include-hidden-files: 'true'
- name: Commit
# The workflow upto this point is good for generating a preview,
# but only commit to deploy if we are on the master branch (not a pull request).
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./.api-out
target-folder: api
clean: false