2020-05-30 00:32:36 +03:00
|
|
|
name: 'Continuous Integration'
|
2020-01-21 22:05:06 +03:00
|
|
|
on:
|
|
|
|
push:
|
2020-08-20 20:40:56 +03:00
|
|
|
branches-ignore:
|
|
|
|
- 'production'
|
2020-03-01 20:03:58 +03:00
|
|
|
tags-ignore:
|
|
|
|
- '*'
|
2020-01-21 22:05:06 +03:00
|
|
|
paths-ignore:
|
2020-03-01 20:03:58 +03:00
|
|
|
- '.github/**'
|
2020-06-05 22:19:24 +03:00
|
|
|
- '!.github/workflows/ci.yml'
|
2020-03-01 20:03:58 +03:00
|
|
|
- '.travis.yml'
|
|
|
|
- '.gitignore'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'README.md'
|
|
|
|
- 'LICENSE'
|
2020-01-21 22:05:06 +03:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2020-07-29 21:36:47 +03:00
|
|
|
- '**'
|
2020-01-21 22:05:06 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
|
2020-11-22 20:26:29 +03:00
|
|
|
env:
|
2021-03-03 14:00:52 +03:00
|
|
|
GEMS_PATH: vendor/bundle
|
2020-01-21 22:05:06 +03:00
|
|
|
|
2020-11-22 20:26:29 +03:00
|
|
|
steps:
|
2020-01-21 22:05:06 +03:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-04-09 22:15:51 +03:00
|
|
|
with:
|
2020-11-22 20:26:29 +03:00
|
|
|
fetch-depth: 0 # for posts's lastmod
|
|
|
|
|
|
|
|
- name: Setup Ruby
|
|
|
|
uses: actions/setup-ruby@v1
|
|
|
|
with:
|
2020-12-06 18:12:20 +03:00
|
|
|
ruby-version: 2.7
|
2020-01-21 22:05:06 +03:00
|
|
|
|
|
|
|
- name: Bundle Caching
|
2020-11-22 20:26:29 +03:00
|
|
|
uses: actions/cache@v2
|
2020-01-21 22:05:06 +03:00
|
|
|
with:
|
2020-11-22 20:26:29 +03:00
|
|
|
path: ${{ env.GEMS_PATH }}
|
2020-12-06 18:12:20 +03:00
|
|
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
2020-01-21 22:05:06 +03:00
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gems-
|
|
|
|
|
|
|
|
- name: Bundle Install
|
|
|
|
run: |
|
2020-11-22 20:26:29 +03:00
|
|
|
bundle config path ${{ env.GEMS_PATH }}
|
|
|
|
bundle install --jobs 4 --retry 3
|
2020-01-21 22:05:06 +03:00
|
|
|
|
|
|
|
- name: Build Site
|
2020-11-22 20:26:29 +03:00
|
|
|
env:
|
|
|
|
JEKYLL_ENV: production
|
2020-01-21 22:05:06 +03:00
|
|
|
run: |
|
2020-11-22 20:26:29 +03:00
|
|
|
bundle exec jekyll b
|
2020-01-21 22:05:06 +03:00
|
|
|
|
|
|
|
- name: Test Site
|
|
|
|
run: |
|
|
|
|
bash tools/test.sh
|