Checkout base branch #2838
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
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
name: API Documentation | |
on: | |
push: | |
branches: | |
- "**" | |
paths-ignore: | |
- ".github/workflows/cache_*.yml" | |
- "docker/dev/**" | |
pull_request: | |
branches: | |
- "**" | |
paths-ignore: | |
- ".github/workflows/cache_*.yml" | |
- "docker/dev/**" | |
schedule: | |
# Cron syntax: [minute hour day_of_the_month month day_of_the_week] | |
- cron: "0 2 * * 0,3" # Run every Sunday and Wednesday at 02:00 | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: API Documentation | |
runs-on: ubuntu-latest | |
env: | |
BUILD_TYPE: Release | |
COMPILER: gcc | |
BUILD_DOCS: ON | |
steps: | |
# Extract branch name | |
- name: Extract branch name | |
if: github.event_name != 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
id: extract_branch | |
# Extract branch name on pull request | |
- name: Print branch name | |
if: github.event_name == 'pull_request' | |
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prework for installing packages using cache | |
run: | | |
sudo apt update | |
sudo apt install -y cmake | |
- name: Install Dependencies with cache | |
uses: awalsh128/[email protected] | |
with: | |
packages: > | |
build-essential | |
libboost-all-dev | |
clang | |
clang-format-12 | |
cmake | |
curl | |
doxygen | |
gcovr | |
git | |
lcov | |
lsb-release | |
pkg-config | |
software-properties-common | |
valgrind | |
libassimp-dev | |
libeigen3-dev | |
libfcl-dev | |
libfmt-dev | |
coinor-libipopt-dev | |
freeglut3-dev | |
libxi-dev | |
libxmu-dev | |
libbullet-dev | |
libtinyxml2-dev | |
liburdfdom-dev | |
liburdfdom-headers-dev | |
libopenscenegraph-dev | |
libnlopt-cxx-dev | |
liboctomap-dev | |
libode-dev | |
libspdlog-dev | |
ocl-icd-opencl-dev | |
libpython3-dev | |
pybind11-dev | |
python3 | |
python3-dev | |
python3-distutils | |
python3-numpy | |
python3-pip | |
python3-setuptools | |
version: 1.1 | |
- name: Install Python dependencies | |
run: | | |
pip3 install pytest -U | |
- name: Build | |
run: | | |
./scripts/build_docs.sh build | |
- name: Deploy | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: gh-pages | |
enable_jekyll: true | |
- name: Cleanup | |
run: | | |
./scripts/build_docs.sh clean |