-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.31 KB
/
jekyll.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Jekyll build to Github Pages
# manual for now
on: workflow_dispatch
# allows only one concurrent workflow execution (with the same group)
# also do NOT cancel in-progress runs, let them complete
concurrency:
group: "pages"
cancel-in-progress: false
# allow GITHUB_TOKEN to deploy to github pages
permissions:
contents: read
pages: write
id-token: write
jobs:
jekyll_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true # runs 'bundle install' and caches installed gems
- name: Add commit SHA to footer
run: sed -i "s/%%%SHA/$GITHUB_SHA/" _includes/footer.html
- name: Jekyll build
env:
JEKYLL_ENV: production
run: bundle exec jekyll build
- name: Upload artifact # create github pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: "_site/" # _site is the default jekyll build dir
deploy_pages:
runs-on: ubuntu-latest
needs: jekyll_build
steps:
- uses: actions/deploy-pages@v2 # deploy site artifact to github-pages environment