-
Notifications
You must be signed in to change notification settings - Fork 170
52 lines (43 loc) · 1.34 KB
/
build.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
name: Build and Push
on: ["push", "pull_request"]
jobs:
build_job:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.6']
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Pull cache
uses: actions/cache@v2
with:
path: |
vendor/bundle
**/node_modules
key: bundle-use-ruby-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-use-ruby-${{ matrix.ruby }}-
- name: bundle install
run: |
gem install bundler:2.1.4
bundle config deployment true
bundle config path vendor/bundle
bundle install --jobs 4
- name: Build the page
run: bundle exec jekyll build
- name: Check for broken links
run: "bundle exec htmlproofer --assume-extension --allow-hash-href ./_site || true"
- name: Push to GH Pages
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/source' && github.event_name == 'push'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: master
FOLDER: _site