-
-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (35 loc) · 966 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
43
name: Publish site
on:
push:
branches:
- jekyll
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup ruby & install dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install npm dependencies
run: npm install
- name: Build production jekyll site
run: JEKYLL_ENV=production NODE_ENV=production bundle exec jekyll build
env:
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _site
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'