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
52 changes: 52 additions & 0 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Preview build

# Builds the site on every push to a non-master branch and uploads the rendered
# _site/ folder as a downloadable artifact you can preview locally. The live
# canlab.github.io site (served from master) is not affected.

on:
push:
branches-ignore:
- master
- main
workflow_dispatch: # also allows running manually from the Actions tab

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out branch
uses: actions/checkout@v4

# The committed Gemfile.lock is from 2018 and pins gems that don't resolve
# on modern Ruby. For previews we re-resolve from the Gemfile.
- name: Refresh Gemfile.lock
run: rm -f Gemfile.lock

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true

- name: Build site with Jekyll
# Stack _config.preview.yml on top of _config.yml so generated links
# are root-relative (work when served from a local http server).
run: bundle exec jekyll build --trace --config _config.yml,_config.preview.yml
env:
JEKYLL_ENV: production
# github-pages gem needs the owner/repo when not running inside the
# official GitHub Pages builder.
PAGES_REPO_NWO: ${{ github.repository }}

# Future improvement: add an internal-link checker step here (e.g.
# lycheeverse/lychee-action) once the existing site is clean enough
# not to fail every build. Run locally with htmlproofer first to
# establish a baseline.

- name: Upload built site as artifact
uses: actions/upload-artifact@v4
with:
name: site-${{ github.ref_name }}-${{ github.sha }}
path: _site
retention-days: 14
306 changes: 0 additions & 306 deletions _config copy.yml

This file was deleted.

9 changes: 9 additions & 0 deletions _config.preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Overrides used only by the preview build workflow.
# Empty url + baseurl makes all generated links root-relative so the site
# works when served from any local web server (e.g. python3 -m http.server).

url: ""
baseurl: ""

analytics:
provider: false
11 changes: 9 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,17 @@ social:


# Analytics
# Set provider to "google-universal" or "google" and add a tracking_id below to enable.
# Currently disabled because no tracking ID has been configured (the previous setting
# loaded the analytics include with no ID, which silently did nothing).
analytics:
provider : "google-universal" # false (default), "google", "google-universal", "custom"
provider : false # false (default), "google", "google-universal", "custom"
google:
tracking_id :
tracking_id : # e.g. "UA-XXXXXXXX-X" or "G-XXXXXXXXXX"

# SEO: to surface this site in search engines, also submit the sitemap (auto-generated
# at /sitemap.xml by jekyll-sitemap) to Google Search Console at
# https://search.google.com/search-console — and add the verification token below.


# Site Author
Expand Down
3 changes: 3 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ main:
- title: "Batch system"
url: /batch/

- title: '<i class="fa fa-search" aria-hidden="true"></i> Search'
url: /search/

# - title: "Portfolio"
# url: /portfolio/

Expand Down
Loading
Loading