-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from Avogadro/fixup-build
Fixup build script
- Loading branch information
Showing
3 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,78 @@ | ||
nameEndBug/add-and-commit@v9 | ||
name: Build Sphinx | ||
|
||
on: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '31 2 * * *' | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build-html: | ||
name: Update website | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# build the doxygen XML for breathe | ||
- name: Checkout openchemistry | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: openchemistry/openchemistry | ||
submodules: recursive | ||
path: openchemistry | ||
|
||
- name: Checkout openchemistry and avogadrolibs | ||
uses: actions/checkout@v3 | ||
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 Sphinx and requirements | ||
run: | | ||
pip install -U sphinx myst-parser breathe pydata-sphinx-theme sphinx-design sphinx-copybutton linkify-it-py pygments | ||
- 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: | | ||
cmake --build . | ||
cd avogadrolibs | ||
ninja documentation | ||
shell: bash | ||
working-directory: ${{ runner.workspace }}/build | ||
|
||
- name: Build Sphinx | ||
run: | | ||
cd source | ||
sphinx-build -E . .. | ||
cd .. | ||
git status | ||
shell: bash | ||
|
||
- name: Setup tmate session | ||
if: ${{ failure() }} | ||
uses: mxschmitt/action-tmate@v3 | ||
|
||
- name: Update git repo | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
message: Deploy Sphinx build | ||
push: origin gh-pages --set-upstream --force | ||
add: '*' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Binary file not shown.
This file was deleted.
Oops, something went wrong.