Skip to content

Upgrade ruby jekyll #5158

Upgrade ruby jekyll

Upgrade ruby jekyll #5158

Workflow file for this run

# This is the name of the workflow that will show up in Github Actions Tab
name: build_programming_historian
# This is where we specify when to automatically run our action. In this case we want to run it on pull_requests and specific triggers. You can read more about these event triggers in the Github Docs https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
pull_request:
types: [ assigned, opened, synchronize, reopened, closed ]
# This is where we list all of our jobs that will run in the build sequence
jobs:
build:
# First we specify build platform and then checkout the repository
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Next we setup our installation of Ruby but only if the PR event is not closing the PR (don't need to build twice since Github builds on merge to gh-pages).
- name: 💎 setup ruby
if : github.event.action != 'closed'
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
# We then check if we can build our Jekyll site (all this logic is built-in with Jekyll and this prevents us from merging in any syntax errors).
- name: Jekyll build
if : github.event.action != 'closed'
run: |
bundle install
bundle exec jekyll build
# Next we check all the links in our site to make sure we aren't pushing up broken links.
- name: Check HTML
uses: chabad360/htmlproofer@master
if: github.event.action != 'closed'
with:
directory: "./_site"
arguments: >
--assume-extension .html
--ignore-missing-alt
--ignore-empty-alt
--ignore-files "/assets/,/en/lessons/retired/,/es/lecciones/retirada/,/fr/lecons/retrait/,/pt/licoes/retiradas/,/posts/,/blog/"
--only-4xx
--ignore-status-codes 429,403,400
--ignore-urls "/http://www.gutenberg.org/*/,/https://github.com/programminghistorian/*/,/https://github.com/orgs/programminghistorian/*/,/\#/,/espanol/,/deprecated/,/collection.britishmuseum.org/,/analytics.hathitrust.org/,/fr.wikipedia.org/wiki/,https://web.archive.org/web/20180831094856/http://www.dlsi.ua.es/~borja/riilua/6.TopicModeling_v02.pdf,/medici2023.sciencesconf.org/resource/page/id/2/"
--allow-hash-href
# The arguments to pass to HTMLProofer
# Finally if we are successful in building, we trigger a rebuild of our search index in the search-index repository
- name: Trigger next workflow
if: success() && github.event.action == 'closed'
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: programminghistorian/search-index
event-type: trigger-search-build
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'