Skip to content

Commit 4e28a01

Browse files
test theme combining workflow
1 parent 1b0a0e8 commit 4e28a01

File tree

4 files changed

+66
-4
lines changed

4 files changed

+66
-4
lines changed

.github/workflows/build.yml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,66 @@ 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 project
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
39+
cp -r ./theme ./project/
40+
rm -rf ./project/third-party
41+
42+
- name: Create site
43+
run: |
44+
base_dirs=(
45+
./theme/third-party/beautiful-jekyll
46+
./theme
47+
)
48+
49+
targets=(
50+
*.gemspec
51+
_data
52+
_includes
53+
_layouts
54+
_sass
55+
assets
56+
404.html
57+
_config.yml
58+
favicon.ico
59+
feed.xml
60+
Gemfile
61+
staticman.yml
62+
tags.html
63+
)
64+
65+
for base_dir in "${base_dirs[@]}"; do
66+
for target in "${targets[@]}"; do
67+
if [ -e "$base_dir/$target" ]; then
68+
cp -rf "$base_dir/$target" ./
69+
fi
70+
done
71+
done
72+
73+
# copy project directory, they should only come from the project repo
74+
cp -rf ./project/. ./
75+
76+
# remove theme and project directories, they are no longer needed
77+
rm -rf theme project
78+
79+
# debug contents recursively
80+
ls -Ra
2381
2482
- name: Setup Ruby
2583
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/beautiful-jekyll@6.0.1
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)