-
Notifications
You must be signed in to change notification settings - Fork 51
57 lines (53 loc) · 1.96 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
name: Continuous Integration
on:
push:
# Not needed for main, we have CD there
branches: [ "2.x" ]
pull_request:
branches: [ "main", "2.x" ]
workflow_dispatch:
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "true"
- name: Setup Ruby
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
ruby-version: '2.7.6' # Not needed with a .ruby-version file
bundler: '2.4.10'
bundler-cache: false # runs 'bundle install' and caches installed gems automatically
cache-version: 3 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Update RubyGems and Co
run: gem update --system
- name: Install Ruby Bundles
run: bundle install
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --config '_config.yml' --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: development
- name: Build 2.x with Jekyll
# Outputs to the './_site' directory by default
run: |
cd .submodules/wiremock.org-2.x
bundle exec jekyll build --config '../../_config.yml,../../_config-2.x.yml' --baseurl "${{ steps.pages.outputs.base_path }}/2.x"
env:
JEKYLL_ENV: development
# TODO: Add 3.x build? It is just a config file tweak, so maybe better to not slowdown for now
# TODO: Uncomment when cleaned up (if ever)
# - name: Validate HTML and links
# uses: anishathalye/proof-html@v2
# with:
# directory: ./_site
# enforce_https: false
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1