forked from SedFoam/sedfoam
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (69 loc) · 2.68 KB
/
doc.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
name: Generate_Doc
on:
push:
branches: ['develop']
# Warning : schedule is only for default branch
# schedule:
# - cron: '0 3 * * 1'
defaults:
run:
shell: bash
env:
TZ: 'Europe/Paris'
DEBIAN_FRONTEND: 'noninteractive'
jobs:
docs-build:
runs-on: ubuntu-latest
container: opencfd/openfoam-dev:2406
steps:
- name: install docs package
run: |
sudo apt-get update && sudo apt-get -y install ca-certificates git python3-pip libclang-14-dev &&
sudo apt-get -y install ack-grep libclang-cpp14 wget graphviz tex-gyre texlive-base dvisvgm &&
sudo DEBIAN_FRONTEND=noninteractive TZ='Europe/Paris' apt-get -y install texlive-latex-extra texlive-fonts-extra texlive-fonts-recommended python3-venv &&
python3 -m venv /home/sudofoam/pyenv &&
source /home/sudofoam/pyenv/bin/activate && pip3 install -U jinja2 Pygments && mkdir -p /github/home
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive
path: sedfoam
- name: Install doxygen
run: |
shopt -s expand_aliases &&
wget https://sourceforge.net/projects/doxygen/files/rel-1.9.3/doxygen-1.9.3.linux.bin.tar.gz &&
tar -xvf doxygen-1.9.3.linux.bin.tar.gz
- name: clone m.css and build doc
run: |
shopt -s expand_aliases && export MYPATH=$PWD &&
export PATH=$PWD/doxygen-1.9.3/bin:$PATH &&
cd sedfoam/doc &&
git clone https://github.com/mosra/m.css &&
cd m.css/documentation && cp ../../doxygen.py . &&
source /openfoam/bash.rc && source /home/sudofoam/pyenv/bin/activate &&
python3 doxygen.py ../../conf.py &&
cd ../.. && cp images/* mcssout/html/. && cd mcssout/html &&
sed -i "s|$MYPATH/sedfoam/|https://github.com/sedfoam/sedfoam/blob/master/|g" *.html
# grep -Z -l "ource file" *html | xargs -0 -n 1 sed -i "s|$MYPATH/sedfoam/|https://github.com/sedfoam/sedfoam/blob/master/|g"
- uses: actions/upload-artifact@v4.4.3
with:
name: sedfoam-doc
path: sedfoam/doc/mcssout/html
docs-deploy:
runs-on: ubuntu-latest
container: opencfd/openfoam-dev:2406
needs: docs-build
steps:
- name: install git
run: |
sudo apt-get update && sudo apt-get -y install git
- name: Check out repository code
uses: actions/checkout@v3
- uses: actions/download-artifact@v4.1.8
with:
name: sedfoam-doc
path: html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: html # The folder the action should deploy.