-
Notifications
You must be signed in to change notification settings - Fork 38
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 #182 from cticenhour/site-action-updates
Website generation action updates
- Loading branch information
Showing
5 changed files
with
93 additions
and
38 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 |
---|---|---|
|
@@ -8,7 +8,8 @@ on: | |
jobs: | ||
build-website: | ||
runs-on: ubuntu-latest | ||
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell | ||
# Set up a default shell for all steps | ||
# See: https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
@@ -24,46 +25,26 @@ jobs: | |
use-mamba: true | ||
activate-environment: zapdos | ||
environment-file: scripts/conda_environment.yml | ||
# Note for build step: GitHub-hosted runners are currently limited to 2 cores | ||
# GitHub-hosted runners are currently limited to 2 cores | ||
# See: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | ||
- name: Build Zapdos | ||
run: | | ||
conda activate zapdos | ||
make -j2 | ||
- name: Build Zapdos Doxygen | ||
- name: Build Doxygen | ||
uses: mattnotmitt/[email protected] | ||
with: | ||
doxyfile-path: 'doc/doxygen/Doxyfile' | ||
# Generated Doxygen files are owned by the root user (the GitHub default user for docker-based actions). | ||
# However, we need it to be owned by the runner user. GitHub allows passwordless sudo, so let's do a sudo chown. | ||
# See: https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user | ||
# See: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#administrative-privileges | ||
- name: Set Doxygen files ownership | ||
run: sudo chown -R $(id --user):$(id --group) doc/doxygen/doxygen | ||
# GITHUB_WORKSPACE contains the location of the repository when using the checkout action | ||
# See: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables | ||
- name: Build Zapdos documentation | ||
doxyfile-path: 'doc/Doxyfile' | ||
- name: Build MooseDocs | ||
run: | | ||
cd doc | ||
./moosedocs.py build --destination=$GITHUB_WORKSPACE/../zapdos-site | ||
- name: Clean-up Zapdos | ||
run: | | ||
git submodule deinit -f moose crane squirrel | ||
git clean -xfd | ||
git reset --hard HEAD | ||
# GITHUB_SHA contains the commit SHA that triggered the workflow (the head commit of the master branch) | ||
- name: Checkout gh-pages and push new website | ||
run: | | ||
git fetch origin gh-pages | ||
git checkout gh-pages | ||
rm -rf * | ||
cd $GITHUB_WORKSPACE/../zapdos-site | ||
rm test.html | ||
mv * $GITHUB_WORKSPACE | ||
cd $GITHUB_WORKSPACE | ||
git status | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m "Update zapdos website based on $GITHUB_SHA" | ||
git push origin gh-pages | ||
./moosedocs.py build --destination site | ||
- name: Update gh-pages branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./doc/site | ||
user_name: github-actions | ||
user_email: [email protected] | ||
commit_message: "Update zapdos website based on" | ||
# The commit SHA that triggered the action is added to the end of the above message. |
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 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
File renamed without changes.
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,75 @@ | ||
<!-- HTML header for doxygen 1.9.5--> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=11"/> | ||
<meta name="generator" content="Doxygen $doxygenversion"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME--> | ||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME--> | ||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/> | ||
<!--BEGIN DISABLE_INDEX--> | ||
<!--BEGIN FULL_SIDEBAR--> | ||
<script type="text/javascript">var page_layout=1;</script> | ||
<!--END FULL_SIDEBAR--> | ||
<!--END DISABLE_INDEX--> | ||
<script type="text/javascript" src="$relpath^jquery.js"></script> | ||
<script type="text/javascript" src="$relpath^dynsections.js"></script> | ||
$treeview | ||
$search | ||
$mathjax | ||
$darkmode | ||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" /> | ||
$extrastylesheet | ||
</head> | ||
<body> | ||
<!--BEGIN DISABLE_INDEX--> | ||
<!--BEGIN FULL_SIDEBAR--> | ||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! --> | ||
<!--END FULL_SIDEBAR--> | ||
<!--END DISABLE_INDEX--> | ||
|
||
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> | ||
|
||
<!--BEGIN TITLEAREA--> | ||
<div id="titlearea"> | ||
<table cellspacing="0" cellpadding="0"> | ||
<tbody> | ||
<tr id="projectrow"> | ||
<!--BEGIN PROJECT_LOGO--> | ||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td> | ||
<!--END PROJECT_LOGO--> | ||
<!--BEGIN PROJECT_NAME--> | ||
<td id="projectalign"> | ||
<a href="https://shannon-lab.github.io/zapdos" style="text-decoration:none"><div id="projectname">$projectname</div></a><div id="projectname"> | ||
<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER--> | ||
</div> | ||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF--> | ||
</td> | ||
<!--END PROJECT_NAME--> | ||
<!--BEGIN !PROJECT_NAME--> | ||
<!--BEGIN PROJECT_BRIEF--> | ||
<td> | ||
<div id="projectbrief">$projectbrief</div> | ||
</td> | ||
<!--END PROJECT_BRIEF--> | ||
<!--END !PROJECT_NAME--> | ||
<!--BEGIN DISABLE_INDEX--> | ||
<!--BEGIN SEARCHENGINE--> | ||
<!--BEGIN !FULL_SIDEBAR--> | ||
<td>$searchbox</td> | ||
<!--END !FULL_SIDEBAR--> | ||
<!--END SEARCHENGINE--> | ||
<!--END DISABLE_INDEX--> | ||
</tr> | ||
<!--BEGIN SEARCHENGINE--> | ||
<!--BEGIN FULL_SIDEBAR--> | ||
<tr><td colspan="2">$searchbox</td></tr> | ||
<!--END FULL_SIDEBAR--> | ||
<!--END SEARCHENGINE--> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!--END TITLEAREA--> | ||
<!-- end header part --> |