Merge pull request #27 from lanl/Daniel #10
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
# Build, test, and install on different versions of Ubuntu | |
name: Linux | |
on: | |
push: | |
branches: [master] | |
env: | |
# CMake configuration for build with docs | |
CMAKE_CONFIG_FLAGS: -DCMAKE_INSTALL_PREFIX=/home/runner/work/install -DCMAKE_BUILD_TYPE=Release -DWITH_DOCS=ON -DCMAKE_INSTALL_DOCDIR=/home/runner/work/install/docs | |
jobs: | |
publish-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master branch | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install build dependencies | |
run: | | |
pip install -IU -r ${{github.workspace}}/docs/sphinx-dependencies.txt | |
sudo apt-get install doxygen -y | |
- name: Configure CMake to build the docs | |
run: cmake ${{env.CMAKE_CONFIG_FLAGS}} -B ${{github.workspace}}/build | |
- name: Build ELEMENTS with docs | |
run: cmake --build ${{github.workspace}}/build --verbose | |
- name: Install ELEMENTS with docs | |
run: cmake --install ${{github.workspace}}/build | |
- name: Clear out everything in directory except .git | |
run: | | |
mv .git .. | |
rm -rf * | |
mv ../.git . | |
- name: Checkout gh-pages branch | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: Configure git information | |
run: | | |
git config --global user.name Jan Kiviaho | |
git config --global user.email [email protected] | |
#- name: Update/add doc files | |
# run: | | |
# cp -r /home/runner/work/install/docs/* . | |
# git add -A | |
# git commit -m "Automated publication of documentation" | |
- name: Push changes | |
# You may pin to the exact commit or the version. | |
# uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
branch: gh-pages |