Skip to content

Commit 5daadb1

Browse files
authored
Add GitHub Actions workflow for Jekyll site deployment
1 parent 64762aa commit 5daadb1

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy Jekyll site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Build the site with Jekyll
23+
run: |
24+
docker run \
25+
-v ${{ github.workspace }}:/srv/jekyll \
26+
-v ${{ github.workspace }}/_site:/srv/jekyll/_site \
27+
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
28+
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: ./_site
33+
34+
deploy:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)