Skip to content

Commit eea29cd

Browse files
Add jekyll workflow
1 parent ab04b47 commit eea29cd

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

‎.github/workflows/jekyll.yml‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["main"]
13+
paths:
14+
- 'site/**'
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
20+
permissions:
21+
contents: read
22+
pages: write
23+
id-token: write
24+
25+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
26+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
27+
concurrency:
28+
group: "pages"
29+
cancel-in-progress: false
30+
31+
jobs:
32+
# Build job
33+
build:
34+
runs-on: ubuntu-latest
35+
defaults:
36+
run:
37+
working-directory: site
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
with:
42+
ref: ${{ github.event.inputs.branch }}
43+
44+
- name: Setup Ruby
45+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
46+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
47+
with:
48+
ruby-version: '3.3.6' # Not needed with a .ruby-version file
49+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
50+
cache-version: 0 # Increment this number if you need to re-download cached gems
51+
working-directory: '${{github.workspace }}/site'
52+
- name: Setup Pages
53+
id: pages
54+
uses: actions/configure-pages@v5
55+
- name: Build with Jekyll
56+
# Outputs to the './_site' directory by default
57+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
58+
env:
59+
JEKYLL_ENV: production
60+
- name: Upload artifact
61+
# Automatically uploads an artifact from the './_site' directory by default
62+
uses: actions/upload-pages-artifact@v3
63+
with:
64+
path: "site/_site/"
65+
66+
# Deployment job
67+
deploy:
68+
environment:
69+
name: github-pages
70+
url: ${{ steps.deployment.outputs.page_url }}
71+
runs-on: ubuntu-latest
72+
needs: build
73+
steps:
74+
- name: Deploy to GitHub Pages
75+
id: deployment
76+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)