Skip to content

Commit 08e92e8

Browse files
authored
Create deploy-site.yml
1 parent 9a1356a commit 08e92e8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/deploy-site.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build & Deploy Jekyll from /site
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '3.1' # or whatever Jekyll needs
24+
bundler-cache: true
25+
26+
- name: Install dependencies
27+
run: |
28+
cd site
29+
bundle install
30+
31+
- name: Build Jekyll site
32+
run: |
33+
cd site
34+
bundle exec jekyll build -d _site # builds into site/_site
35+
36+
- name: Upload build output
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: site/_site # 👈 The built HTML folder
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)