Skip to content

Commit 92d5124

Browse files
test theme combining workflow
1 parent 1b0a0e8 commit 92d5124

File tree

4 files changed

+65
-4
lines changed

4 files changed

+65
-4
lines changed

.github/workflows/build.yml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,65 @@ jobs:
1818
name: Build Jekyll
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout
21+
- name: Checkout theme
2222
uses: actions/checkout@v4
23+
with:
24+
repository: LizardByte/LizardByte.github.io
25+
ref: ${{ github.repository == 'LizardByte/LizardByte.github.io' && github.ref || 'master' }}
26+
submodules: recursive
27+
path: theme
28+
29+
- name: Checkout repo
30+
if: ${{ github.repository != 'LizardByte/LizardByte.github.io' }}
31+
uses: actions/checkout@v4
32+
with:
33+
path: project
34+
35+
- name: Setup project
36+
if: ${{ github.repository }} == 'LizardByte/LizardByte.github.io'
37+
run: |
38+
mkdir -p project/_posts
39+
cp -r ./theme project/
40+
41+
- name: Create site
42+
run: |
43+
base_dirs=(
44+
./theme/third-party/beautiful-jekyll
45+
./theme
46+
./project
47+
)
48+
49+
targets=(
50+
_data
51+
_includes
52+
_layouts
53+
_sass
54+
assets
55+
404.html
56+
_config.yml
57+
*.gemspec
58+
feed.xml
59+
Gemfile
60+
staticman.yml
61+
tags.html
62+
)
63+
64+
for base_dir in "${base_dirs[@]}"; do
65+
for target in "${targets[@]}"; do
66+
if [ -e "$base_dir/$target" ]; then
67+
cp -r "$base_dir/$target" ./
68+
fi
69+
done
70+
done
71+
72+
# copy project posts, they should only come from the project repo
73+
cp -r project ./
74+
75+
# remove theme and project directories, they are no longer needed
76+
rm -rf theme project
77+
78+
# debug contents recursively
79+
ls -Ra
2380
2481
- name: Setup Ruby
2582
uses: ruby/setup-ruby@v1

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "third-party/beautiful-jekyll"]
2+
path = third-party/beautiful-jekyll
3+
url = https://github.com/daattali/beautiful-jekyll.git
4+
branch = master

_config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
############################
1212

1313
# https://beautifuljekyll.com/getstarted/#method-1-github-repository-with-remote_theme
14-
# remote_theme: daattali/[email protected]
15-
remote_theme: daattali/beautiful-jekyll@b1b667e372acf5f602cca6fee64dd850af70f3da
16-
# TODO: move to LizardByte fork, with customizations specific to our site
14+
# remote_theme: daattali/beautiful-jekyll
15+
# Our custom workflow will handle setting up the theme. E.g. combining beautifuljekyll with our customizations.
1716

1817
# Name of website
1918
title: LizardByte

third-party/beautiful-jekyll

Submodule beautiful-jekyll added at b1b667e

0 commit comments

Comments
 (0)