-
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1004 Bytes
/
publish-site.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
name: Publish example site
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Cache gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-bundler-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-bundler-
- name: Build production jekyll site
run: |
cd example
bundle config path vendor/bundle
bundle install
bundle exec jekyll build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./example/_site
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'