66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
name: 'Continuous Integration'
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- 'production'
|
|
tags-ignore:
|
|
- '*'
|
|
paths-ignore:
|
|
- '.github/**'
|
|
- '!.github/workflows/ci.yml'
|
|
- '.travis.yml'
|
|
- '.gitignore'
|
|
- 'docs/**'
|
|
- 'README.md'
|
|
- 'LICENSE'
|
|
pull_request:
|
|
paths:
|
|
- '**'
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
steps:
|
|
- uses: actions/setup-ruby@v1
|
|
with:
|
|
ruby-version: '2.6.x'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Bundle Caching
|
|
id: bundle-cache
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: vendor/bundle
|
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gems-
|
|
|
|
- name: Bundle config
|
|
run: |
|
|
bundle config path vendor/bundle
|
|
|
|
- name: Bundle Install
|
|
if: steps.bundle-cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
bundle install
|
|
|
|
- name: Bundle Install locally
|
|
if: steps.bundle-cache.outputs.cache-hit == 'true'
|
|
run: |
|
|
bundle install --local
|
|
|
|
- name: Build Site
|
|
run: |
|
|
JEKYLL_ENV=production bundle exec jekyll b
|
|
|
|
- name: Test Site
|
|
run: |
|
|
bash tools/test.sh
|