-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eeb81ee
commit 4edee13
Showing
2 changed files
with
86 additions
and
0 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,46 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
apt-get update >/dev/null | ||
apt-get install -y git cmake doxygen graphviz >/dev/null | ||
|
||
#List of branches to build docs for | ||
#TODO: Remove doxygen branch once tested | ||
BRANCHES="doxygen master develop" | ||
|
||
build-docs() ( | ||
git checkout $1 | ||
|
||
#The CMake Doxygen stuff is weird, and doesn't | ||
#properly clean up and/or overwrite old outputs. | ||
#So to make sure we get the correct doc configs, | ||
#we need to delete everything | ||
#We put the docs themselves into a hidden directory | ||
#so they don't get included in this glob | ||
rm -rf ./* | ||
|
||
cmake ../ -DBUILD_DOCS=ON -DDOCS_ONLY=ON \ | ||
-DFENIX_DOCS_MAN=OFF -DFENIX_BRANCH=$1 \ | ||
-DFENIX_DOCS_OUTPUT=$PWD/.docs | ||
make doc | ||
) | ||
|
||
git clone https://www.github.com/sandialabs/Fenix.git | ||
mkdir Fenix/build | ||
cd Fenix/build | ||
|
||
for branch in $BRANCHES; do | ||
echo "Building docs for $branch" | ||
|
||
#TODO: Fail if any branch fails to build, | ||
# once the develop and master branches have doxygen | ||
# merged in | ||
build-docs $branch || true | ||
|
||
echo | ||
echo | ||
done | ||
|
||
if [ -n "$GITHUB_ENV" ]; then | ||
echo "DOCS_DIR=$PWD/.docs" >> $GITHUB_ENV | ||
fi |
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,40 @@ | ||
name: Publish GH Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
- doxygen # TODO: Remove after testing | ||
|
||
#Only one of this workflow runs at a time | ||
concurrency: | ||
group: docs | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build pages | ||
run: /bin/bash .github/scripts/build-gh-pages.sh | ||
|
||
- name: Upload documentation artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ${{ env.DOCS_DIR }} | ||
|
||
deploy-docs: | ||
needs: build-pages | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Deploy documentation to GH Pages | ||
uses: actions/deploy-pages@v4 | ||
|