Add contact us to webpage and update link locations for team (#21) #54
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
name: build | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
pages: write | |
contents: read | |
id-token: write | |
jobs: | |
render: | |
runs-on: self-hosted | |
container: | |
image: firedrakeproject/firedrake:latest | |
options: --shm-size 2g | |
env: | |
OMP_NUM_THREADS: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: g-adopt/g-adopt | |
path: tutorials | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y libgl1-mesa-glx xvfb | |
. /home/firedrake/firedrake/bin/activate | |
python3 -m pip install nbval nbconvert jupytext | |
python3 -m pip install tutorials/[demos] | |
python3 -m ipykernel install --name firedrake --user | |
- name: Convert notebooks | |
run: | | |
. /home/firedrake/firedrake/bin/activate | |
export DISPLAY=:99 | |
export PYVISTA_OFF_SCREEN=true | |
Xvfb $DISPLAY -screen 0 1024x768x24 > /dev/null 2>&1 & | |
sleep 3 | |
make -j -C tutorials convert_demos | |
rm -rf rendered && mkdir rendered | |
find tutorials/demos -name '*.ipynb' -exec cp "{}" rendered \; | |
cp tutorials/demos/.pages rendered | |
cp tutorials/demos/.diagram.mermaid rendered | |
env: | |
GADOPT_LOGLEVEL: WARN | |
- uses: actions/upload-artifact@v4 | |
continue-on-error: true | |
with: | |
name: notebooks | |
path: rendered | |
build: | |
runs-on: ubuntu-latest | |
needs: render | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
cache: pip | |
- name: Install Python dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Clone G-ADOPT for API documentation | |
uses: actions/checkout@v4 | |
with: | |
repository: g-adopt/g-adopt | |
path: g-adopt | |
- uses: actions/download-artifact@v4 | |
with: | |
name: notebooks | |
path: docs/tutorials | |
- name: Build site | |
run: | | |
mkdocs build --clean | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
environment: | |
name: github-pages | |
steps: | |
- uses: actions/deploy-pages@v4 |