-
Notifications
You must be signed in to change notification settings - Fork 552
69 lines (56 loc) · 2.12 KB
/
update-API-documentation.yaml
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
name: Update Documentation on Website
on:
push:
branches:
- master
jobs:
build_and_update_docs:
runs-on: ubuntu-latest
outputs:
libnabo_tag: ${{ steps.step1.outputs.libnabo_tag }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential cmake doxygen graphviz libboost-all-dev libeigen3-dev libyaml-cpp-dev
- name: Install libnabo 1) install jq
run: sudo apt install -y jq # Install jq for JSON processing
- name: Install libnabo 2) Get Latest Release Tag
id: get_latest_release
run: |
TAG=$(curl -s https://api.github.com/repos/norlab-ulaval/libnabo/releases/latest | jq -r '.tag_name')
echo "::set-output name=tag::$TAG"
- name: Install libnabo 4) Install libnabo
run: |
git clone -b ${{ steps.get_latest_release.outputs.tag }} https://github.com/norlab-ulaval/libnabo.git
echo "Latest release tag: ${{ steps.get_latest_release.outputs.tag }}"
mkdir -p libnabo/build
cd libnabo/build
cmake ..
sudo make install
- name: Set up libpointmatcher CMake
run: |
mkdir build
cd build
cmake -DGENERATE_API_DOC=TRUE ..
- name: Build Documentation
run: cd build && make doc
- name: Clone website repository
uses: actions/checkout@v2
with:
repository: norlab-ulaval/norlab-ulaval.github.io
path: website
ssh-key: ${{ secrets.NORLAB_WEBSITE_DOCUMENTATION }}
ref: master
- name: Replace documentation files
run: cp -r build/doc/html website/libpointmatcher-doc
- name: Commit and push changes
run: |
cd website
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add libpointmatcher-doc
git commit -m "Update documentation for new release" || exit 0
git push origin HEAD:refs/heads/update-libpointmatcher-docs --force