Skip to content

Commit

Permalink
Use GH Jekyll procedure: setup-ruby, setup pages, run Jekyll.
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Naumann committed Nov 28, 2023
1 parent d57f68b commit ad46a4e
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,22 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Build website
uses: root-project/jekyll-action@HEAD
- name: Setup Ruby
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
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@v3

- name: Build with Jekyll
# Outputs to the './build' directory by default
run: bundle exec jekyll build --baseurl "build/${PR_NUMBER:-}"
env:
JEKYLL_ENV: production

- name: Only allow links to root.cern, never root.cern.ch
run: |
Expand All @@ -33,7 +47,7 @@ jobs:
- name: Only allow links to ref guide for master (except in release notes and when linking to release notes)
run: |
# grep for https://root.cern/doc/(!"master" && !"vXXX/release-notes.html"). If something is found, error out.
grep --exclude="index.html" --exclude-dir="releases" --exclude-dir="reference" --exclude-dir="all_releases" --exclude-dir="feed" -n -R -P 'https:\/\/root\.cern\/doc\/(?!(master|v[0-9]{3}\/release-notes\.html))' build\
grep --exclude="index.html" --exclude-dir="releases" --exclude-dir="reference" --exclude-dir="all_releases" --exclude-dir="feed" -n -R -P 'https:\/\/root\.cern\/doc\/(?!(master|v[0-9]{3}\/release-notes\.html))' build \
|| exit 0 # grep returns non-zero if no match is found
echo -e "\nFound links to /doc/NOT_MASTER (see above). Please change them to link to /doc/master."
exit 1
Expand Down

0 comments on commit ad46a4e

Please sign in to comment.