Skip to content

Commit d3d1e0a

Browse files
authored
Create build.yml
1 parent 31d9607 commit d3d1e0a

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- testbuild2
7+
workflow_dispatch: {}
8+
repository_dispatch: {}
9+
10+
jobs:
11+
build:
12+
if: github.repository == 'mmistakes/minimal-mistakes'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: '3.2'
22+
- name: Setup cache for Bundler
23+
id: cache
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
docs/Gemfile.lock
28+
docs/vendor/bundle
29+
key: ${{ runner.os }}-bundler-${{ hashFiles('docs/Gemfile') }}
30+
restore-keys: |
31+
${{ runner.os }}-bundler-
32+
33+
- name: Install - Bundler
34+
env:
35+
MAKE: make -j2
36+
working-directory: docs/
37+
run: |
38+
bundle config set path vendor/bundle
39+
bundle install --jobs=4 --retry=3
40+
bundle clean
41+
42+
- name: Update Algolia index
43+
working-directory: docs/
44+
run: bundle exec jekyll algolia push
45+
env:
46+
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
47+
continue-on-error: true

0 commit comments

Comments
 (0)