Skip to content

Added Leo PLATEAU paper #30

Added Leo PLATEAU paper

Added Leo PLATEAU paper #30

Workflow file for this run

name: Deploy Jekyll site to Pages

Check failure on line 1 in .github/workflows/jekyll.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/jekyll.yml

Invalid workflow file

(Line: 20, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RUNNER_TOOL_CACHE || '/opt/hostedtoolcache'
on:
push:
branches: ["master"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
RUBY_VERSION_FULL: "3.1.4" # exact version we’ll place in toolcache
RUBY_VERSION_SHORT: "3.1" # what bundler/setup-ruby will request
TOOLCACHE_DIR: "${{ env.RUNNER_TOOL_CACHE || '/opt/hostedtoolcache' }}"
jobs:
build:
# If you truly must run on your Ubuntu 24.04 self-hosted label, keep it.
# For GitHub-hosted 24.04, use: runs-on: ubuntu-24.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
# --- Bootstrap Ruby into toolcache if needed (self-hosted-detected case) ---
- name: Ensure Ruby in toolcache (self-hosted safe)
shell: bash
run: |
set -euo pipefail
RUBY_DIR="$TOOLCACHE_DIR/Ruby/$RUBY_VERSION_FULL/x64"
SENTINEL="$RUBY_DIR.complete"
LOCK="/var/tmp/ruby-${RUBY_VERSION_FULL}.lock"
echo "Toolcache dir: $TOOLCACHE_DIR"
echo "Target Ruby dir: $RUBY_DIR"
if [ -f "$SENTINEL" ]; then
echo "Ruby $RUBY_VERSION_FULL already present (sentinel found)."
exit 0
fi
# If the runner already has a working Ruby matching the short version, don't rebuild.
if command -v ruby >/dev/null 2>&1; then
INSTALLED="$(ruby -e 'print RUBY_VERSION' || true)"
if [[ "${INSTALLED:-}" == ${RUBY_VERSION_SHORT}.* ]]; then
echo "A matching Ruby ${INSTALLED} is already available on PATH; skipping toolcache build."
# Let setup-ruby use this one.
exit 0
fi
fi
sudo mkdir -p "$RUBY_DIR"
sudo chown -R "$USER":"$USER" "$TOOLCACHE_DIR"
# Serialize builds across parallel jobs
exec 9>"$LOCK"
if ! flock -n 9; then
echo "Another job is building Ruby. Waiting on lock..."
flock 9
fi
# Double-check after acquiring lock.
if [ -f "$SENTINEL" ]; then
echo "Ruby $RUBY_VERSION_FULL now present (sentinel found after lock)."
exit 0
fi
echo "Installing build prerequisites..."
sudo apt-get update -y
sudo apt-get install -y \
build-essential autoconf bison \
libssl-dev zlib1g-dev libreadline-dev libyaml-dev \
libxml2-dev libxslt1-dev libffi-dev libgdbm-dev \
libdb-dev uuid-dev
echo "Installing ruby-build..."
if ! command -v ruby-build >/dev/null 2>&1; then
git clone --depth=1 https://github.com/rbenv/ruby-build.git
sudo ./ruby-build/install.sh
fi
echo "Building Ruby $RUBY_VERSION_FULL into toolcache..."
ruby-build "$RUBY_VERSION_FULL" "$RUBY_DIR"
# Setup toolcache layout for setup-ruby
# (create a version file; some tools look for this)
echo "$RUBY_VERSION_FULL" > "$RUBY_DIR.version"
# Mark complete so other jobs don't rebuild
touch "$SENTINEL"
echo "Ruby $RUBY_VERSION_FULL installed at $RUBY_DIR"
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION_SHORT }} # '3.1'
bundler-cache: true
cache-version: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4