Skip to content

Commit 730d8fa

Browse files
feat(build): use jekyll and restyle website
1 parent dfccc6c commit 730d8fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1402
-1578
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# ignore hidden files
2+
.*
3+
4+
_site/

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ensure dockerfiles are checked out with LF line endings
2+
Dockerfile text eol=lf
3+
*.dockerfile text eol=lf

.github/workflows/build.yml

Lines changed: 57 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,59 @@ on:
99
branches: [master]
1010
workflow_dispatch:
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
13-
update:
17+
build:
18+
name: Build Jekyll
1419
runs-on: ubuntu-latest
15-
1620
steps:
1721
- name: Checkout
1822
uses: actions/checkout@v4
1923

24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: '3.3'
28+
29+
- name: Install dependencies
30+
run: |
31+
bundle install
32+
33+
- name: Setup Pages
34+
id: configure-pages
35+
uses: actions/configure-pages@v5
36+
37+
- name: Setup CI config
38+
run: |
39+
echo "---" > _config_ci.yml
40+
echo "baseurl: ${{ steps.configure-pages.outputs.base_path }}" >> _config_ci.yml
41+
42+
- name: Build site
43+
env:
44+
JEKYLL_ENV: production
45+
PAGES_REPO_NWO: ${{ github.repository }}
46+
run: |
47+
bundle exec jekyll build --future --config _config_ci.yml,_config.yml
48+
49+
- name: Upload artifact
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: site
53+
path: _site
54+
if-no-files-found: error
55+
retention-days: 1
56+
57+
deploy:
58+
name: Deploy to Pages
59+
if: >-
60+
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
61+
(github.event_name == 'workflow_dispatch')
62+
runs-on: ubuntu-latest
63+
needs: build
64+
steps:
2065
- name: Checkout gh-pages
2166
uses: actions/checkout@v4
2267
with:
@@ -25,38 +70,22 @@ jobs:
2570
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal token
2671
fetch-depth: 0 # otherwise, will fail to push refs to dest repo
2772

28-
- name: Get current date
29-
id: date
30-
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
31-
32-
- name: Build website
73+
- name: Clean
3374
run: |
34-
# install npm dependencies
35-
npm install
36-
3775
# empty contents of gh-pages
3876
rm -f -r ./gh-pages/*
3977
40-
# move contents of dist to gh-pages
41-
mv -f ./dist/* ./gh-pages/
42-
43-
# move node_modules directory to gh-pages
44-
mv -f ./node_modules/ ./gh-pages/
45-
46-
- name: Upload Artifacts
47-
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
48-
uses: actions/upload-artifact@v4
78+
- name: Download artifact
79+
uses: actions/download-artifact@v4
4980
with:
50-
name: gh-pages
51-
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
52-
path: |
53-
${{ github.workspace }}/gh-pages
54-
!**/*.git
81+
name: site
82+
path: gh-pages
83+
84+
- name: no-jekyll
85+
run: |
86+
touch gh-pages/.nojekyll
5587
5688
- name: Deploy to gh-pages
57-
if: >-
58-
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
59-
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
6089
uses: actions-js/[email protected]
6190
with:
6291
github_token: ${{ secrets.GH_BOT_TOKEN }}
@@ -65,4 +94,4 @@ jobs:
6594
directory: gh-pages
6695
branch: gh-pages
6796
force: false
68-
message: automatic-update-${{ steps.date.outputs.date }}
97+
message: "Deploy site from ${{ github.sha }}"

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
# ignore JetBrains project
22
.idea/
33

4-
# ignore node modules
5-
node_modules/
6-
package-lock.json
7-
8-
# ignore duplicated dist folder for localization
9-
dist/en
10-
dist/es-ES
4+
_site/

.run/Dockerfile.run.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
3+
<deployment type="dockerfile">
4+
<settings>
5+
<option name="containerName" value="LizardByte-site" />
6+
<option name="portBindings">
7+
<list>
8+
<DockerPortBindingImpl>
9+
<option name="containerPort" value="4000" />
10+
<option name="hostPort" value="4000" />
11+
</DockerPortBindingImpl>
12+
</list>
13+
</option>
14+
<option name="commandLineOptions" value="--net=host" />
15+
<option name="sourceFilePath" value="Dockerfile" />
16+
</settings>
17+
</deployment>
18+
<method v="2" />
19+
</configuration>
20+
</component>

404.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: 404 - Page not found
3+
layout: default
4+
permalink: /404.html
5+
---
6+
7+
<div class="text-center">
8+
<h1>Whoops, this page doesn't exist.</h1>
9+
<h1>Move along. (404 error)</h1>
10+
<br/>
11+
12+
<img src="{{ 'assets/img/404-southpark.jpg' | relative_url }}" alt="Not found" />
13+
</div>

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
app.lizardbyte.dev

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM ruby:3.3-bookworm
2+
3+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4+
5+
RUN <<_DEPS
6+
#!/bin/bash
7+
set -e
8+
9+
apt-get update -qq
10+
apt-get install -y --no-install-recommends \
11+
build-essential
12+
apt-get clean
13+
rm -rf /var/lib/apt/lists/*
14+
_DEPS
15+
16+
WORKDIR /app
17+
18+
COPY . .
19+
20+
# Install the gems specified in the Gemfile
21+
RUN <<_SETUP
22+
#!/bin/bash
23+
set -e
24+
25+
bundle install
26+
_SETUP
27+
28+
# Expose the port that Jekyll will run on
29+
EXPOSE 4000
30+
31+
# Command to build and serve the Jekyll site
32+
CMD ["bundle", "exec", "jekyll", "serve", "--trace", "--config", "_config.yml,_config_local.yml"]

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
gem 'jekyll'
3+
gem 'github-pages', group: :jekyll_plugins

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Overview
2+
3+
## About
4+
5+
This repo contains the source files for the [LizardByte](https://app.lizardbyte.dev) website.
6+
7+
The page is built using jekyll and hosted on GitHub Pages.
8+
9+
## Integrations
10+
11+
[![GitHub Workflow Status (Build)](https://img.shields.io/github/actions/workflow/status/lizardbyte/lizardbyte.github.io/build.yml.svg?branch=master&label=build&logo=github&style=for-the-badge)](https://github.com/LizardByte/LizardByte.github.io/actions/workflows/build.yml?query=branch%3Amaster)
12+
13+
### CrowdIn Localization
14+
15+
[![CrowdIn graph](https://app.lizardbyte.dev/dashboard/crowdin/LizardByte_graph.svg)](https://translate.lizardbyte.dev)

0 commit comments

Comments
 (0)