Skip to content

Commit b2aa2b7

Browse files
test theme combining workflow
1 parent 1b0a0e8 commit b2aa2b7

File tree

4 files changed

+74
-4
lines changed

4 files changed

+74
-4
lines changed

.github/workflows/build.yml

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,75 @@ jobs:
1717
build:
1818
name: Build Jekyll
1919
runs-on: ubuntu-latest
20+
env:
21+
TMPDIR: /home/runner/work/tmp
2022
steps:
21-
- name: Checkout
23+
- name: Checkout theme
2224
uses: actions/checkout@v4
25+
with:
26+
repository: LizardByte/LizardByte.github.io
27+
ref: ${{ github.repository == 'LizardByte/LizardByte.github.io' && github.ref || 'master' }}
28+
submodules: recursive
29+
path: theme
30+
31+
- name: Checkout project
32+
if: ${{ github.repository != 'LizardByte/LizardByte.github.io' }}
33+
uses: actions/checkout@v4
34+
with:
35+
path: project
36+
37+
- name: Setup project
38+
if: ${{ github.repository == 'LizardByte/LizardByte.github.io' }}
39+
run: |
40+
mkdir -p ${TMPDIR}
41+
mkdir -p ./project
42+
cp -RT ./theme/ ./project/
43+
rm -rf ./project/third-party
44+
45+
- name: Create site
46+
run: |
47+
base_dirs=(
48+
./theme/third-party/beautiful-jekyll
49+
./theme
50+
)
51+
52+
targets=(
53+
*.gemspec
54+
_data
55+
_includes
56+
_layouts
57+
_sass
58+
assets
59+
404.html
60+
_config.yml
61+
favicon.ico
62+
feed.xml
63+
Gemfile
64+
staticman.yml
65+
tags.html
66+
)
67+
68+
for base_dir in "${base_dirs[@]}"; do
69+
for target in "${targets[@]}"; do
70+
if [ -e "$base_dir/$target" ]; then
71+
cp -rf "$base_dir/$target" ${TMPDIR}/
72+
fi
73+
done
74+
done
75+
76+
# copy project directory, they should only come from the project repo
77+
cp -RTf ./project/ ${TMPDIR}/
78+
79+
# remove the workspace
80+
cd ..
81+
rm -rf ${GITHUB_WORKSPACE}
82+
83+
# move the temporary directory to the workspace
84+
mv ${TMPDIR} ${GITHUB_WORKSPACE}
85+
cd ${GITHUB_WORKSPACE}
86+
87+
# debug contents recursively
88+
ls -Ra
2389
2490
- name: Setup Ruby
2591
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)