-
Notifications
You must be signed in to change notification settings - Fork 196
162 lines (135 loc) · 4.13 KB
/
deploy.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Website
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- humble
permissions:
contents: read
pages: write
id-token: write
jobs:
htmlproofer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade --requirement requirements.txt
- name: Install doxygen and graphviz
run: sudo apt-get install -y doxygen graphviz
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3'
- name: Run htmlproofer.sh
run: ./htmlproofer.sh
upload_site_artifacts:
strategy:
matrix:
include:
- container: 'moveit/moveit2:rolling-source'
branch: 'main'
rosdistro: 'rolling'
- container: 'moveit/moveit2:humble-source'
branch: 'humble'
rosdistro: 'humble'
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
- name: Install Python dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y python3-pip
pip3 install --upgrade --requirement requirements.txt
- name: Install doxygen and graphviz
run: sudo apt-get install -y doxygen graphviz
- name: Build Sphinx Artifacts
shell: bash
run: |
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
source /root/ws_moveit/install/setup.bash
make generate_api_artifacts BRANCH=${{ matrix.branch }}
- name: Compress Artifact
run: tar cvzf artifact.tar.gz --directory=build/html .
- name: Upload HTML Artifact
uses: actions/upload-artifact@v3
with:
name: '${{ matrix.branch }}_html_artifacts'
path: artifact.tar.gz
collate_site_artifacts:
runs-on: ubuntu-latest
needs: upload_site_artifacts
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'main'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade --requirement requirements.txt
- name: Install doxygen and graphviz
run: sudo apt-get install -y doxygen graphviz
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3'
# TODO (peterdavidfagan): don't hardcode branches for downloads
- name: Download Rolling Artifacts
uses: actions/download-artifact@v3
with:
name: main_html_artifacts
path: .
- name: Decompress Rolling Artifact
run: |
mkdir -p build/html/main
tar -xf artifact.tar.gz --directory=build/html/main
rm artifact.tar.gz
- name: Download Humble Artifacts
uses: actions/download-artifact@v3
with:
name: humble_html_artifacts
path: .
- name: Decompress Humble Artifact
run: |
mkdir -p build/html/humble
tar -xf artifact.tar.gz --directory=build/html/humble
rm artifact.tar.gz
- name: Create CNAME file
run: echo "moveit.picknik.ai" > build/html/CNAME
# TODO(henningkayser): fix hack for using python api artifact in multiversion
- name: Build multiversion
run: |
cp -r build/html/main/doc/api/python_api/ . # backup artifact html
make multiversion
cp -rf python_api/ build/html/main/doc/api/ # restore artifact html
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
if: github.repository_owner == 'ros-planning'
with:
path: build/html
deploy:
if: github.repository_owner == 'ros-planning' && github.ref == 'refs/heads/humble'
runs-on: ubuntu-latest
needs: collate_site_artifacts
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2