Skip to content

Commit b5229af

Browse files
committed
Add GitHub Pages deploy workflow
1 parent daed83b commit b5229af

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/pages-deploy.yml

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

0 commit comments

Comments
 (0)