Skip to content

R Resources blog post #1222

R Resources blog post

R Resources blog post #1222

Workflow file for this run

name: CI build
on:
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Linux
runs-on: ubuntu-latest
env:
# Control the use of htmlproofer. Set to '1' to enable htmlproofer.
USE_HTMLPROOFER: '0'
steps:
# Clone the repository and checkout into the relevant branch
- uses: actions/[email protected]
# Install Ruby
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.3 # Check https://pages.github.com/versions/ for the current Ruby version used by gh pages.
# Install dependencies required to run jekyll build
- name: Install gh-pages rubygem via bundler
run: |
# Update gem and bundler
gem update --system --no-document
gem update bundler --no-document
# Set the bundle directory
bundle config set path vendor/bundle
# Install Gemfile contents via bundler
bundle install
# Build the website via jekyll
- name: Build jekyll website with drafts
run: bundle exec jekyll build --drafts
# Check for broken links if enabled
- name: Check for broken links
if: ${{ env.USE_HTMLPROOFER == '1' }}
run: |
bundle exec htmlproofer --disable-external --allow-hash-href --internal-domains=rse.shef.ac.uk,rse.sheffield.ac.uk --log-level :debug ./_site &> links.log
continue-on-error: true
# Store the list of potentially broken links
- name: Archive log links
if: ${{ env.USE_HTMLPROOFER == '1' }}
uses: actions/upload-artifact@v1
with:
name: links-check.log
path: links.log