Change Build Tutorial Image
CI job to only build main against Rolling
#2096
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
container: | |
image: moveit/moveit2:rolling-source | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7' | |
- name: Run htmlproofer.sh | |
shell: bash | |
run: | | |
source /opt/ros/rolling/setup.bash | |
source /root/ws_moveit/install/setup.bash | |
./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.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: '2.7' | |
# 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 build/html/main/doc/api/python_api/api.html . # backup artifact html | |
make multiversion | |
cp -f api.html build/html/main/doc/api/python_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/main' | |
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@v1 |