-
Notifications
You must be signed in to change notification settings - Fork 19
59 lines (57 loc) · 1.87 KB
/
deploy.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
58
59
name: Build and Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3 # FIXME: add apt (latex)
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
#- uses: actions/cache@v2
#with:
#path: ~/.cache/pip
#key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '.github/python/requirements.txt') }}
#restore-keys: |
#${{ runner.os }}-pip-
#- name: Install TeXLive
#uses: DanySK/[email protected]
#- id: setup-python
#name: Setup Python
#uses: actions/setup-python@v2
#with:
#python-version: 3.8
#- name: Install dependencies
#uses: py-actions/py-dependency-install@v2
#with:
#path: ".github/python/requirements.txt"
- name: Setup 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 lesson
#run: ITK_DIR=/usr/lib/InsightToolkit ./build.sh
- name: Builds website
uses: helaili/jekyll-action@v2
with:
pre_build_commands: 'bundle update ffi' # to solve helaili/jekyll-action#112
target_branch: 'gh-pages'
build_only: true
- name: Build website and deploy
if: github.ref == 'refs/heads/main'
uses: helaili/jekyll-action@v2
with:
pre_build_commands: 'bundle update ffi' # to solve helaili/jekyll-action#112
target_branch: 'gh-pages'
token: ${{ secrets.GITHUB_TOKEN }}