Skip to content

Add: new blog post - czi funding announcement #626

Add: new blog post - czi funding announcement

Add: new blog post - czi funding announcement #626

Workflow file for this run

name: Build and Jekyll site and run htmlproofer
on:
pull_request:
push:
branches:
- main
jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
# Use GitHub Actions' cache to shorten build times and decrease load on servers
- name: Use cache to shorten build time
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Build Jekyll site
uses: helaili/jekyll-action@v2
with:
build_only: true
build_dir: _site
- name: all dirs
run: |
ls
pwd
- name: Install dependencies
run: |
gem install --user-install html-proofer
export PATH="$HOME/.gem/ruby/$(ruby -e 'puts RUBY_VERSION')/bin:$PATH"
- name: Run HTMLProofer with Ruby script that skips new links
run: |
directories=['content']
merge_base = $(git merge-base origin/main HEAD)
diffable_files = $(git diff --name-only --diff-filter=AC $merge_base)
diffable_files = $(echo $diffable_files | tr '\n' '\0' | xargs -0 -I {} bash -c "if [[ {} == */* ]]; then echo {}; else echo {}; fi")
diffable_files = $(echo $diffable_files | tr '\0' '\n' | grep '\.md$' | xargs -I {} basename {} .md)
# Run HTMLProofer
HTMLProofer.check_directory("./_site", { ignore_urls: diffable_files }).run
# - name: Check HTML using htmlproofer
# uses: chabad360/htmlproofer@master
# with:
# directory: "_site"
# arguments: |
# --ignore-urls "https://fonts.googleapis.com,https://fonts.gstatic.com,_site/_posts/README/index.html"
# --ignore-files "/.+\/_posts\/README.md"
# --ignore-status-codes "0,403, 429, 503, 999"