Skip to content

even more debugging in workflow #31

even more debugging in workflow

even more debugging in workflow #31

Workflow file for this run

# NOTE THAT in addition to this file, you need to check on github.com
# - enable github pages (select deploy from a branch)
# - go to the Settings -> Environments tab
# then select the 'github-pages' environment
# and make sure the branch of interest (here main) is allowed in the 'Branch protection rules' area
name: Deploy MyST to GitHub Pages
on:
# Allows manual trigger
workflow_dispatch:
push:
branches:
- main
# the following sets permissions of the GITHUB_TOKEN
# to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# this is no longer needed as we serve from info-mines.paris
# required for MyST
# env:
# # `BASE_URL` determines the website is served from, including CSS & JS assets
# # You may need to change this to `BASE_URL: ''`
# BASE_URL: /${{ github.event.repository.name }}
jobs:
build-and-deploy:
runs-on: self-hosted
container:
image: ghcr.io/prefix-dev/pixi:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
clean: true
- name: Setup dependencies
run: |
pixi install
- name: Install MyST Markdown
run: |
pixi run install-myst
- name: Install monitoring utils
run: |
# apt update && apt install -y net-tools iproute2 metcat-openbsd curl procps
apt update && apt install -y net-tools
- name: Diagnostic - Check Python Modules
run: |
echo checking python imports
pixi run python -c "import sqlite3; print('SQLite3 OK'); import ipykernel; print('IPykernel OK')"
echo listing jupyter kernels
pixi run jupyter kernelspec list
echo which python / jupyter
pixi run which python
pixi run which jupyter
- name: Start Background Monitor
run: |
cat << 'EOF' > monitor.sh
echo "Listing pixi..."
pixi list
echo "Starting monitor..."
while true; do
matches=$(ps -ef | grep -E "python|jupyter|myst" | grep -v grep || true)
if [ -z "$matches" ]; then
echo "$(date +%H:%M:%S) === No process found"
else
echo "$(date +%H:%M:%S) === ACTIVITY DETECTED ==="
echo "$matches"
# Check for open sockets immediately
ss -tulpn | grep python || echo "No sockets yet"
fi
sleep 0.5
done
EOF
chmod +x monitor.sh
# Run in background and redirect output to a file we can read later
./monitor.sh > monitor.log 2>&1 &
echo $! > monitor.pid
echo "Monitor started with PID $(cat monitor.pid)"
- name: Build HTML Assets
run: |
export PYTHONPATH=$(pwd)/modules
pixi run myst-build-debug
- name: Finalize and Show Logs
if: always()
run: |
echo "--- DEBUG LOGS FROM MONITOR ---"
if [ -f monitor.log ]; then cat monitor.log; fi
if [ -f monitor.pid ]; then kill $(cat monitor.pid) || true; fi
- name: Setup Pages
uses: actions/configure-pages@v3
- 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
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}