Skip to content

Commit

Permalink
test theme combining workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Dec 18, 2024
1 parent 1b0a0e8 commit 715b282
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
59 changes: 58 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,65 @@ jobs:
name: Build Jekyll
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout theme
uses: actions/checkout@v4
with:
repository: LizardByte/LizardByte.github.io
ref: ${{ github.repository == 'LizardByte/LizardByte.github.io' && github.ref || 'master' }}
submodules: recursive
path: theme

- name: Checkout repo
if: ${{ github.repository != 'LizardByte/LizardByte.github.io' }}
uses: actions/checkout@v4
with:
path: project

- name: Setup project
if: ${{ github.repository }} == 'LizardByte/LizardByte.github.io'
run: |
mkdir -p ./project
cp -r ./theme ./project/
- name: Create site
run: |
pwd
base_dirs=(
./theme/third-party/beautiful-jekyll
./theme
)
targets=(
_data
_includes
_layouts
_sass
assets
404.html
_config.yml
*.gemspec
feed.xml
Gemfile
staticman.yml
tags.html
)
for base_dir in "${base_dirs[@]}"; do
for target in "${targets[@]}"; do
if [ -e "$base_dir/$target" ]; then
cp -rf "$base_dir/$target" ./
fi
done
done
# copy project directory, they should only come from the project repo
cp -rf ./project/. ./
# remove theme and project directories, they are no longer needed
rm -rf theme project
# debug contents recursively
ls -Ra
- name: Setup Ruby
uses: ruby/setup-ruby@v1
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "third-party/beautiful-jekyll"]
path = third-party/beautiful-jekyll
url = https://github.com/daattali/beautiful-jekyll.git
branch = master
5 changes: 2 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
############################

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

# Name of website
title: LizardByte
Expand Down
1 change: 1 addition & 0 deletions third-party/beautiful-jekyll
Submodule beautiful-jekyll added at b1b667

0 comments on commit 715b282

Please sign in to comment.