Skip to content

feat: light mode default + theme toggle to far left #65

feat: light mode default + theme toggle to far left

feat: light mode default + theme toggle to far left #65

name: MyST GitHub Pages Deploy
on:
push:
branches:
- main
workflow_dispatch:
env:
BASE_URL: /${{ github.event.repository.name }}
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python and Jupyter
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r .binder/requirements.txt
- name: Install system dependencies from .binder/apt.txt
run: |
sudo apt-get update
< .binder/apt.txt xargs sudo apt-get install -y
- name: Setup Pages
uses: actions/configure-pages@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install MyST Markdown CLI
run: npm install -g mystmd
- name: Install Typst
run: |
curl -L -o typst.tar.xz \
https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz
tar -xf typst.tar.xz
mv typst-x86_64-unknown-linux-musl/typst /usr/local/bin/
- name: Prepare Directories
run: mkdir -p exports
- name: Build PDF Assets (with execution)
env:
MYST_PDF_BUILD: "1"
run: |
myst build iceberg-prediction-whitepaper-v2.md --pdf || echo "Iceberg PDF build failed, continuing"
myst build index.md --pdf || echo "Index PDF build failed, continuing"
myst build hyperparameter-optimization-whitepaper.md --pdf --execute || echo "HPO PDF build failed, continuing"
- name: Build HTML Assets (with execution)
run: myst build --execute -d --html --md
- name: Ensure PDFs are in HTML output
run: |
mkdir -p _build/html/exports
find . -name "*.pdf" 2>/dev/null | head -20
cp exports/*.pdf _build/html/exports/ 2>/dev/null || echo "No PDFs in exports/ to copy"
find _build -name "*.pdf" 2>/dev/null | xargs -I{} cp {} _build/html/exports/ 2>/dev/null || true
ls -la _build/html/exports/ 2>/dev/null || echo "No exports directory"
- name: Copy custom CSS to build directory
run: |
cp custom.css _build/html/ || echo "custom.css file not found"
cp custom.css _build/html/assets/ || echo "custom.css file not found"
- name: Copy project assets into build output
run: cp -R assets _build/html/assets
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _build/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.PAGES_TOKEN }}