Skip to content

Commit

Permalink
add stuff to build website, include links to repositories and documen…
Browse files Browse the repository at this point in the history
…tation for some of the packages.
  • Loading branch information
mbkuhn committed Oct 2, 2024
1 parent 707854c commit 898daf5
Show file tree
Hide file tree
Showing 5 changed files with 473 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/problem-matchers/sphinx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"problemMatcher": [
{
"owner": "sphinx-problem-matcher",
"pattern": [
{
"regexp": "^(.*):(\\d+):\\s+(\\w*):\\s+(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
},
{
"owner": "sphinx-problem-matcher-loose",
"pattern": [
{
"_comment": "A bit of a looser pattern, doesn't look for line numbers, just looks for file names relying on them to start with / and end with .rst",
"regexp": "(\/.*\\.rst):\\s+(\\w*):\\s+(.*)$",
"file": 1,
"severity": 2,
"message": 3
}
]
},
{
"owner": "sphinx-problem-matcher-loose-no-severity",
"pattern": [
{
"_comment": "Looks for file names ending with .rst and line numbers but without severity",
"regexp": "^(.*\\.rst):(\\d+):(.*)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
48 changes: 48 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ExaWind-MainPage

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{github.ref}}-${{github.head_ref}}-docs
cancel-in-progress: true

jobs:
Docs:
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
python3 -m pip install --upgrade pip
pip3 install sphinx sphinx_rtd_theme sphinx_toolbox sphinx_copybutton
- name: Build
run: |
echo "::add-matcher::.github/problem-matchers/sphinx.json"
sphinx-build -M html ./.website_src ./build_docs/website -W --keep-going -n 2>&1 | tee -a build-output.txt
mv ./build_docs/website/html ./documentation
touch ./documentation/.nojekyll
- name: Report
run: |
echo "::add-matcher::.github/problem-matchers/sphinx.json"
egrep "WARNING:|Warning:|warning:|ERROR:|Error:|error:" build-output.txt | sort | uniq | \
awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > build-output-warnings.txt
cat build-output-warnings.txt
exit $(tail -n 1 build-output-warnings.txt | awk '{print $2}')
- name: Deploy
if: github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
BRANCH: gh-pages
FOLDER: documentation
SINGLE_COMMIT: true
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Avoid making conflicting website addresses with other repositories
amr-wind/
amr-wind.*
nalu-wind/
nalu-wind.*
exawind-driver/
exawind-driver.*
exawind-benchmarks/
exawind-benchmarks.*
Loading

0 comments on commit 898daf5

Please sign in to comment.