-
Notifications
You must be signed in to change notification settings - Fork 5
89 lines (77 loc) · 3.36 KB
/
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Deploy documentation (https://docs.seqan.de/)
on:
push:
branches:
- master
env:
CMAKE_VERSION: 3.7.2
DOXYGEN_VERSION: 1.8.20
TZ: Europe/Berlin
jobs:
deploy_documentation:
name: Deploy Documentation
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get cached Doxygen
uses: actions/cache@v2
with:
path: /tmp/doxygen-download
key: ${{ runner.os }}-Doxygen_${{ env.DOXYGEN_VERSION }}
- name: Setup Doxygen
shell: bash -ex {0}
run: |
mkdir -p /tmp/doxygen-download
wget --retry-connrefused --waitretry=30 --read-timeout=30 --timeout=30 --tries=20 --no-clobber --quiet --directory-prefix=/tmp/doxygen-download/ https://sourceforge.net/projects/doxygen/files/rel-${DOXYGEN_VERSION}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
tar -C /tmp/ -zxf /tmp/doxygen-download/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "/tmp/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH # Only available in subsequent steps!
- name: Get cached CMake
uses: actions/cache@v2
with:
path: /tmp/cmake-download
key: ${{ runner.os }}-CMake_${{ env.CMAKE_VERSION }}
- name: Setup CMake
shell: bash -ex {0}
run: |
mkdir -p /tmp/cmake-download
wget --retry-connrefused --waitretry=30 --read-timeout=30 --timeout=30 --tries=20 --no-clobber --quiet --directory-prefix=/tmp/cmake-download/ https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
tar -C /tmp/ -zxf /tmp/cmake-download/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
echo "/tmp/cmake-${CMAKE_VERSION}-Linux-x86_64/bin" >> $GITHUB_PATH # Only available in subsequent steps!
- name: Install Dependencies
run: sudo apt-get install texlive-font-utils ghostscript texlive-latex-extra graphviz libclang-9-dev libclang-cpp9 # graphviz for dot, latex to parse formulas, libclang for doxygen
- name: Load cached documentation
uses: actions/cache@v2
with:
path: doc-build
key: ${{ runner.os }}-documentation
- name: Build documentation
shell: bash -ex {0}
run: |
mkdir -p doc-build
cd doc-build
cmake ../test/documentation
make -j 2 doc_usr doc_dev
- name: Deploy User Documentation
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_HOST_SSH_KEY }}
REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
with:
flags: '-avzr --delete --timeout=60 --omit-dir-times'
src: 'doc-build/doc_usr/html/'
dest: '$REMOTE_USER@$REMOTE_HOST:$TARGET/3-master-user'
- name: Deploy Developer Documentation
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_HOST_SSH_KEY }}
REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
with:
flags: '-avzr --delete --timeout=60 --omit-dir-times'
src: 'doc-build/doc_dev/html/'
dest: '$REMOTE_USER@$REMOTE_HOST:$TARGET/3-master-dev'