-
Notifications
You must be signed in to change notification settings - Fork 37
33 lines (28 loc) · 898 Bytes
/
build-jekyll.yml
File metadata and controls
33 lines (28 loc) · 898 Bytes
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
name: Build and Deploy to Github Pages
on:
push:
branches:
- master # Here source code branch is `master`, it could be other branch
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Use GitHub Actions' cache to cache dependencies on servers
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
# Update search index
- name: Update search index
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API }}
run: |
bundle exec jekyll algolia
# Use GitHub Deploy Action to build and deploy to Github
- uses: helaili/jekyll-action@v2
with:
token: ${{ secrets.GH_TOKEN }}
target_branch: 'gh-pages'