Skip to content

Commit 962d791

Browse files
authored
[feat] finally switchgin to custom workflow (#88)
1 parent 79f111c commit 962d791

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Jekyll with Pagefind
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: '3.1'
28+
bundler-cache: true
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '20'
34+
35+
- name: Setup Pages
36+
id: pages
37+
uses: actions/configure-pages@v4
38+
39+
- name: Build Jekyll
40+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
41+
env:
42+
JEKYLL_ENV: production
43+
44+
- name: Build Pagefind search index
45+
run: npx pagefind --site _site
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)