forked from AMReX-Codes/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate building and deploying the documentation to Github CI. (AMReX…
- Loading branch information
Showing
7 changed files
with
92 additions
and
126 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2020 The AMReX Community | ||
# | ||
# License: BSD-3-Clause-LBNL | ||
# Authors: Andrew Myers | ||
|
||
set -eu -o pipefail | ||
|
||
sudo apt-get update | ||
|
||
sudo apt-get install -y --no-install-recommends\ | ||
build-essential \ | ||
pandoc \ | ||
doxygen \ | ||
texlive \ | ||
texlive-latex-extra \ | ||
texlive-lang-cjk \ | ||
latexmk | ||
|
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build and Deploy | ||
on: [push, pull_request] | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Dependencies | ||
run: | | ||
.github/workflows/dependencies/documentation.sh | ||
python3 -m pip install sphinx sphinx_rtd_theme breathe | ||
- name: Install and Build | ||
run: | | ||
./build_docs.sh | ||
- name: Deploy | ||
if: github.event_name == 'push' && github.repository == 'AMReX-Codes/amrex' && github.ref == 'refs/heads/development' | ||
uses: JamesIves/github-pages-deploy-action@3.7.1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ACCESS_TOKEN: ${{ secrets.DEPLOY_DOCS }} | ||
REPOSITORY_NAME: AMReX-Codes/AMReX-Codes.github.io | ||
BRANCH: main # The branch the action should deploy to. | ||
FOLDER: build # The folder the action should deploy. | ||
CLEAN: true # Automatically remove deleted files from the deploy branch |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
set -e # Exit with nonzero exit code if anything fails | ||
|
||
# Doxygen | ||
echo "Build the Doxygen documentation" | ||
cd Docs/Doxygen | ||
doxygen doxygen.conf &> doxygen.out | ||
cd ../.. | ||
|
||
# sphinx | ||
cd Docs/sphinx_documentation | ||
|
||
echo "Build the Sphinx documentation for Amrex." | ||
make PYTHON="python3" latexpdf | ||
mv build/latex/amrex.pdf source/ | ||
make PYTHON="python3" html &> make_source_html.out | ||
# | ||
cd ../sphinx_tutorials | ||
echo "Build the Sphinx documentation for the Amrex tutorials." | ||
make PYTHON="python3" latexpdf &> make_tutorials_latex.out | ||
mv build/latex/amrex.pdf source/ | ||
make PYTHON="python3" html &> make_tutorials_html.out | ||
cd ../../ | ||
|
||
mkdir build | ||
cd build | ||
mkdir amrex | ||
cd amrex | ||
mkdir docs_html tutorials_html docs_xml | ||
|
||
# add doxygen | ||
mkdir -p docs_html/doxygen | ||
cp -rp ../../Docs/Doxygen/html/* docs_html/doxygen/ | ||
mkdir -p docs_xml/doxygen | ||
cp -rp ../../Docs/Doxygen/xml/* docs_xml/doxygen/ | ||
|
||
# add sphinx | ||
cp -rp ../../Docs/sphinx_documentation/build/html/* docs_html/ | ||
cp -rp ../../Docs/sphinx_tutorials/build/html/* tutorials_html/ |
Binary file not shown.