Skip to content
Snippets Groups Projects
Commit 2b3ce979 authored by Cassandra Gould van Praag's avatar Cassandra Gould van Praag
Browse files

Merge branch 'master' of git.fmrib.ox.ac.uk:open-science/community/Open-WIN-Community

parents 662a0422 ae2dc03e
No related branches found
No related tags found
No related merge requests found
Pipeline #17142 passed
Showing
with 1543 additions and 103 deletions
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): bullseye, buster
ARG VARIANT=bullseye
FROM mcr.microsoft.com/vscode/devcontainers/jekyll:0-${VARIANT}
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
\ No newline at end of file
# [Choice] Debian OS version (use 2.7-bullseye on local arm64/Apple Silicon): 2.7-bullseye, 2.7-buster
ARG VARIANT=2.7-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
COPY library-scripts/meta.env /usr/local/etc/vscode-dev-containers
# ENV Variables required by Jekyll
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
TZ=Etc/UTC \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US
# Install bundler, latest jekyll, and github-pages for older jekyll
RUN gem install bundler jekyll github-pages
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.224.2/containers/jekyll
{
"name": "Just the docs",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a Debian OS version: bullseye, buster
// Use bullseye when on local arm64/Apple Silicon.
"VARIANT": "bullseye",
// Enable Node.js: pick the latest LTS version
"NODE_VERSION": "lts/*"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["GitHub.vscode-pull-request-github"],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
// Jekyll server
4000,
// Live reload server
35729
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sh .devcontainer/post-create.sh",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
#!/bin/sh
# Install the version of Bundler.
if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock > /dev/null; then
cat Gemfile.lock | tail -n 2 | grep -C2 "BUNDLED WITH" | tail -n 1 | xargs gem install bundler -v
fi
# If there's a Gemfile, then run `bundle install`
# It's assumed that the Gemfile will install Jekyll too
if [ -f Gemfile ]; then
bundle install
fi
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/pmarsceill/just-the-docs/discussions
url: https://github.com/just-the-docs/just-the-docs/discussions
about: Ask questions and discuss with other community members
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
references:
- v+
- master
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
- main
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: '🚀 Features'
- title: "🚀 Features"
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label:
- 'chore'
- 'dependencies'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
label:
- "chore"
- "dependencies"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
version-resolver:
major:
labels:
- 'next-major-release'
- "next-major-release"
minor:
labels:
- 'next-minor-release'
- "next-minor-release"
patch:
labels:
- 'patch'
- "patch"
default: minor
template: |
## Changes
......
on:
push:
branches:
- master
name: Master branch CI
jobs:
jekyll-latest:
name: Build Jekyll site (latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build the site in the jekyll/builder container
run: |
docker run --rm \
--volume="${{ github.workspace }}:/srv/jekyll" \
jekyll/builder:latest /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init"
jekyll-3-8-5:
name: Build Jekyll site (v3.8.5)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build the site in the jekyll/builder container
run: |
docker run --rm \
--volume="${{ github.workspace }}:/srv/jekyll" \
jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init"
assets:
name: Format and test CSS and JS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm install
- run: npm test
on: [pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main
- 'v**'
name: CI
jobs:
jekyll-latest:
name: Build Jekyll site (latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the site in the jekyll/builder container
run: |
docker run --rm \
--volume="${{ github.workspace }}:/srv/jekyll" \
jekyll/builder:latest /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init"
jekyll-3-8-5:
name: Build Jekyll site (v3.8.5)
jekyll-build:
name: Build Jekyll site
runs-on: ubuntu-latest
strategy:
matrix:
jekyll-version: [3.9, 4.3]
steps:
- uses: actions/checkout@v2
- name: Build the site in the jekyll/builder container
run: |
docker run --rm \
--volume="${{ github.workspace }}:/srv/jekyll" \
jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init"
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: false
- name: Bundle Install
run: bundle install
- name: Install Jekyll ${{ matrix.jekyll-version }}
run: gem install jekyll -v ${{ matrix.jekyll-version }}
- name: Init Search
run: bundle exec rake search:init
- name: Build Site
run: bundle exec jekyll build
assets:
name: Test CSS and JS
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
on:
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
......@@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.6
- uses: actions/checkout@v3
- name: Set up Ruby 3.1
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
ruby-version: 3.1
- name: Publish to GPR
run: |
......
name: Update Vendor plugin - jekyll-anchor-headings
on:
# schedule:
# # once per week
# - cron: "0 15 * * 0"
workflow_dispatch:
jobs:
update-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get latest release information
id: latest-release
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: allejo
repo: jekyll-anchor-headings
excludes: prerelease, draft
- name: Update jekyll-anchor-headings
id: update
uses: suisei-cn/actions-download-file@v1.3.0
with:
url: "https://github.com/allejo/jekyll-anchor-headings/releases/download/${{ steps.latest-release.outputs.release }}/anchor_headings.html"
target: _includes/vendor/
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore[dependency]: Update `jekyll-anchor-headings` to `${{ steps.latest-release.outputs.release }}`"
title: "auto: Update `jekyll-anchor-headings` to `${{ steps.latest-release.outputs.release }}`"
body: |
Update `jekyll-anchor-headings` to `${{ steps.latest-release.outputs.release }}`
This is an automated pull request.
branch: update/vendor/jekyll-anchor-headings
delete-branch: true
labels: |
kind/update
area/dependency
add-paths: |
_includes/vendor/anchor_headings.html
token: ${{ secrets.GITHUB_TOKEN }}
......@@ -7,3 +7,4 @@ _site
Gemfile.lock
node_modules
*.icloud
.DS_Store
image: ruby
before_script:
- gem install bundler:2.1.4
- gem install bundler:2.3.26
pages:
script:
- bundle _2.1.4_ install
- bundle _2.3.26_ install
- bundle exec jekyll build -d public
tags:
- docker
......
......@@ -7,3 +7,4 @@ assets/css/just-the-docs-dark.scss
assets/js/vendor/lunr.min.js
assets/js/search-data.json
assets/js/just-the-docs.js
*.md
......@@ -4,5 +4,4 @@
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
}
\ No newline at end of file
......@@ -5,9 +5,16 @@
"assets/css/just-the-docs-dark.scss",
"_sass/vendor/**/*.scss"
],
"extends": ["stylelint-config-primer", "stylelint-config-prettier"],
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-prettier-scss"
],
"plugins": ["stylelint-prettier"],
"rules": {
"prettier/prettier": true
"prettier/prettier": true,
"alpha-value-notation": null,
"color-function-notation": null,
"no-descending-specificity": null,
"scss/no-global-function-names": null
}
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Serve",
"type": "shell",
"command": "bundle exec jekyll serve --livereload",
"group": {
"kind": "test",
"isDefault": true
},
"isBackground": true
},
{
"label": "Build",
"type": "shell",
"command": "bundle exec jekyll build",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
......@@ -8,4 +8,4 @@ search_exclude: true
<h1>Page not found</h1>
<p>The page you requested could not be found. Try using the navigation {% if site.search_enabled != false %}or search {% endif %}to find what you're looking for or go to this <a href="{{ '/' | absolute_url }}">site's home page</a>.</p>
<p>The page you requested could not be found. Try using the navigation {% if site.search_enabled != false %}or search {% endif %}to find what you're looking for or go to this <a href="{{ '/' | relative_url }}">site's home page</a>.</p>
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment