-
-
Notifications
You must be signed in to change notification settings - Fork 305
46 lines (44 loc) · 1.21 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: MrGreen-JekyllTheme jekyll build test
# on a push or pull request is made on the main branch
on:
push:
paths-ignore:
- 'docs/**'
- '.github/**'
- '.editorconfig'
- '.gitattributes'
- '.gitignore'
- 'LICENSE.txt'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- '.github/**'
- '.editorconfig'
- '.gitattributes'
- '.gitignore'
- 'LICENSE.txt'
branches:
- main
jobs:
build-test:
if: ${{ github.repository == 'MrGreensWorkshop/MrGreen-JekyllTheme' }}
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build test
run: |
JEKYLL_ENV=production bundle exec jekyll build --safe
echo "Completed."
shell: bash