Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build and Deploy to GitHub Pages

on:
push:
branches: [ source ]
pull_request:
branches: [ source ]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"

- name: Install dependencies
run: |
pip install -r requirements.txt
# tidy-html5 needs to be installed separately via system package manager
sudo apt-get update && sudo apt-get install -y tidy

- name: Patch nbconvert to fix filename conflicts
run: |
# Find nbconvert's extractoutput.py and apply the fix
NBCONVERT_PATH=$(python -c "import nbconvert.preprocessors.extractoutput as e; print(e.__file__)")
sed -i 's/if filename in resources\['\''outputs'\''\]:/if filename in resources['\''outputs'\''] and False:/' "$NBCONVERT_PATH"
echo "Applied nbconvert patch to disable duplicate filename check"

- name: Build site
run: |
python make.py publish

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./output_branch

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/source'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
url = https://gist.github.com/6139282.git
[submodule "content/notebooks/xkcd_font_glyph_extract"]
path = content/notebooks/xkcd_font_glyph_extract
url = git@gist.github.com:b80e3b3ab9edbda9ac4304f742cf292b.git
url = https://gist.github.com/b80e3b3ab9edbda9ac4304f742cf292b.git
[submodule "content/notebooks/xkcd_font_stroke_classification"]
path = content/notebooks/xkcd_font_stroke_classification
url = https://gist.github.com/pelson/1d6460289f06acabb650797b88c15ae0
[submodule "content/notebooks/xkcd_font_svg_and_creation"]
path = content/notebooks/xkcd_font_svg_and_creation
url = git@gist.github.com:18434e3bd37dcde8dd28a5a24def0060.git
url = https://gist.github.com/18434e3bd37dcde8dd28a5a24def0060.git
[submodule "content/field_notes/lfric_containment"]
path = content/field_notes/lfric_containment
url = git@gist.github.com:26b288663d67f8a418cfd7e023520e3c.git
url = https://gist.github.com/26b288663d67f8a418cfd7e023520e3c.git
[submodule "content/field_notes/coast_path_pt1"]
path = content/field_notes/coast_path_pt1
url = git@gist.github.com:21fbdc5a944f478bdd896faa95ab3cc7.git
url = https://gist.github.com/21fbdc5a944f478bdd896faa95ab3cc7.git
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

Binary file removed deploy-key.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion extras/pelican-plugins
4 changes: 2 additions & 2 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def publish():
new = os.path.join(new_root, fname)
if fname.endswith('.html'):
print('\nConverting {}:'.format(old))
cmd = ['tidy5', '-config', 'tidy_config.txt', old]
cmd = ['tidy', '-config', 'tidy_config.txt', old]
with open(new, 'w') as fh:
try:
code = subprocess.check_call(cmd, stdout=fh)
Expand All @@ -77,7 +77,7 @@ def publish():
if os.path.isdir(fname):
shutil.copytree(fname, os.path.join('output_branch', os.path.basename(fname)))
elif fname.endswith('.html'):
cmd = ['tidy5', '-config', 'tidy_config.txt', fname]
cmd = ['tidy', '-config', 'tidy_config.txt', fname]
with open(os.path.join('output_branch', os.path.basename(fname)), 'w') as fh:
subprocess.check_call(cmd, stdout=fh)
else:
Expand Down
4 changes: 0 additions & 4 deletions noleaky

This file was deleted.

8 changes: 8 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pelican==3.7
markdown<3.0
ipython==3.*
notebook
nbconvert==5.*
pygments
jinja2<3.0
markupsafe<2.0
57 changes: 57 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
anyio==3.7.1
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
attrs==24.2.0
bleach==6.0.0
blinker==1.6.3
cffi==1.15.1
defusedxml==0.7.1
docutils==0.20.1
entrypoints==0.4
exceptiongroup==1.3.0
fastjsonschema==2.21.1
feedgenerator==2.1.0
idna==3.10
importlib-metadata==6.7.0
importlib-resources==5.12.0
ipykernel==4.0.1
ipython==3.2.3
ipython-genutils==0.2.0
Jinja2==2.11.3
jsonschema==4.17.3
jupyter-server==1.15.6
jupyter_client==7.4.9
jupyter_core==4.12.0
Markdown==2.6.11
MarkupSafe==1.1.1
mistune==0.8.4
nbclassic==1.2.0
nbconvert==5.6.1
nbformat==5.8.0
nest-asyncio==1.6.0
notebook==6.5.7
notebook_shim==0.2.4
packaging==24.0
pandocfilters==1.5.1
pelican==3.7.0
pkgutil_resolve_name==1.3.10
prometheus-client==0.17.1
ptyprocess==0.7.0
pycparser==2.21
Pygments==2.17.2
pyrsistent==0.19.3
python-dateutil==2.9.0.post0
pytz==2025.2
pyzmq==26.2.1
Send2Trash==1.8.3
six==1.17.0
sniffio==1.3.1
terminado==0.17.1
testpath==0.6.0
tornado==6.2
traitlets==5.9.0
typing_extensions==4.7.1
Unidecode==1.4.0
webencodings==0.5.1
websocket-client==1.6.1
zipp==3.15.0