-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (47 loc) · 1.4 KB
/
build-website.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
name: build-website
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
jekyll:
runs-on: ubuntu-20.04
strategy:
matrix:
branch: [slicer-org, download-slicer-org]
include:
- branch: download-slicer-org
custom_opts: '--config _config.yml,_config_download.yml'
steps:
- name: 📂 setup
uses: actions/checkout@v2
- name: 💎 setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6 # can change this to 2.7 or whatever version you prefer
# See https://github.com/marketplace/actions/jekyll-action-ts
- name: 🔨 install dependencies & build site
uses: limjh16/jekyll-action-ts@v2
with:
enable_cache: true
custom_opts: ${{ matrix.custom_opts }}
- name: 'Upload website build'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.branch }}-website-build
path: ./_site
retention-days: 1
# See https://github.com/marketplace/actions/github-pages-action
- name: 🚀 deploy
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
force_orphan: true
github_token: ${{ secrets.SLICERBOT_GITHUB_TOKEN }}
publish_dir: ./_site
publish_branch: ${{ matrix.branch }}
user_name: 'Slicer Bot'
user_email: 'slicerbot@users.noreply.github.com'