Skip to content

Upgrade ruby jekyll #5161

Upgrade ruby jekyll

Upgrade ruby jekyll #5161

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
if: github.event.action != 'closed'
run: |
bundle exec htmlproofer ./_site \
--assume-extension .html \
--ignore-missing-alt \
--ignore-empty-alt \
--only-4xx \
--ignore-status-codes 429,403,400,415 \
--ignore-files "/assets/,/en/lessons/retired/,/es/lecciones/retirada/,/fr/lecons/retrait/,/pt/licoes/retiradas/,/posts/,/blog/" \
--ignore-urls "/github\.com\/programminghistorian/,/gutenberg\.org/,/espanol/,/deprecated/,/collection\.britishmuseum\.org/,/analytics\.hathitrust\.org/,/fr\.wikipedia\.org\/wiki/,/humanidadesdigitaleshispanicas\.es/,/dhawards\.org/,/medici2023\.sciencesconf\.org\/resource\/page\/id\/2/,/docnow\.io/,/doxygen\.nl/,/doi\.org\/10\.34190\/JEL\.17\.3\.002/,/doi\.org\/10\.22134\/trace\.82\.2022\.819/,/rubenalcaraz\.es\/manual-omeka\/?/,/web\.archive\.org\/web\/20180831094856\/http:\/\/www\.dlsi\.ua\.es\/~borja\/riilua\/6\.TopicModeling_v02\.pdf/" \
--allow-hash-href
# 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 }}"}'