Skip to content

Commit 62042df

Browse files
committed
Add deploy workflow. Ref #76
1 parent ca496e3 commit 62042df

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Deploy Jekyll with Pagefind
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3.4.4
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: "20"
25+
26+
- name: Install Jekyll dependencies
27+
run: |
28+
gem install bundler
29+
bundle install
30+
31+
- name: Install Pagefind
32+
run: npm install -g pagefind
33+
34+
- name: Build Jekyll site
35+
run: bundle exec jekyll build
36+
37+
- name: Run Pagefind
38+
run: pagefind --source _site
39+
40+
- name: Deploy to GitHub Pages
41+
uses: peaceiris/actions-gh-pages@v4
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: ./_site

0 commit comments

Comments
 (0)