-
Notifications
You must be signed in to change notification settings - Fork 31
88 lines (74 loc) · 2.39 KB
/
build.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build Sphinx
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
build-html:
name: Update website
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
# build the doxygen XML for breathe
- name: Checkout openchemistry
uses: actions/checkout@v4
with:
repository: openchemistry/openchemistry
submodules: recursive
path: openchemistry
- name: Checkout openchemistry and avogadrolibs
uses: actions/checkout@v4
with:
repository: openchemistry/avogadrolibs
path: openchemistry/avogadrolibs
- name: Install packages
run: |
sudo apt-get -qq update
sudo apt-get -qq install doxygen ninja-build libeigen3-dev libglew-dev libxml2-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5x11extras5-dev libqt5svg5-dev
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install Sphinx and requirements
run: uv pip install --system --break-system-packages -r pyproject.toml
- name: Configure
run: |
mv openchemistry ${{ runner.workspace }}
if [ ! -d "${{ runner.workspace }}/build" ]; then mkdir "${{ runner.workspace }}/build"; fi
cd "${{ runner.workspace }}/build"
cmake ${{ runner.workspace }}/openchemistry -G "Ninja" -DBUILD_DOCUMENTATION=ON -DUSE_SYSTEM_LIBXML2=ON -DUSE_SYSTEM_ZLIB=ON
shell: bash
- name: Build doxygen
run: |
ninja
cd avogadrolibs
ninja documentation
shell: bash
working-directory: ${{ runner.workspace }}/build
- name: Build Sphinx
run: |
cd source
sphinx-build -j auto -E . ../public
cd ..
git status
shell: bash
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages