This repo contains the source files for the LizardByte website.
The page is built using jekyll and hosted on GitHub Pages.
This repo contains a reusable workflow to allow for building gh-pages subprojects using the same configuration.
---
name: Jekyll CIpermissions:
contents: readon:
pull_request:
branches:
- mastertypes:
- opened
- synchronize
- reopenedconcurrency:
group: "${{ github.workflow }}-${{ github.ref }}"cancel-in-progress: truejobs:
prep:
runs-on: ubuntu-lateststeps:
# Prepare your site here if needed, you can run any build steps needed to generate the site# The structure of the artifacts must be exactly as you expect to find the files in the final site# e.g. `index.html` should be at the root of the artifact, not in a subdirectory
- name: Sample buildrun: echo "Hello, world!" > hello.txt
- name: Upload artifactuses: actions/upload-artifact@v4with:
name: prep # any name except 'site' is allowedpath: hello.txtif-no-files-found: errorinclude-hidden-files: trueretention-days: 1call-jekyll-build:
needs: prepuses: LizardByte/LizardByte.github.io/.github/workflows/jekyll-build.yml@mastersecrets:
GH_BOT_EMAIL: ${{ secrets.GH_BOT_EMAIL }}GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}with:
gh_bot_name: ${{ vars.GH_BOT_NAME }}site_artifact: 'prep'# any name except 'site' is allowedtarget_branch: 'gh-pages'clean_gh_pages: trueFor additional options see jekyll-build.yml
Changes to gh-pages can be previewed, by setting up the project in ReadTheDocs. It is recommended to use the following manual configuration:
Initial setup:
Name: LizardByte-gh-pages-<repo_name> # the project slug cannot be changed after creationRepository URL: https://github.com/LizardByte/<repo_name>.gitDefault-branch: masterLanguage: EnglishProject Settings:
Connected-repository: https://github.com/LizardByte/<repo_name>.gitURL-versioning-scheme: Multiple versions without translationsPath-for-.readthedocs.yaml: # only set if not in the root of the repoProgramming-Language: OtherProject-homepage: https://app.lizardbyte.dev/<repo_name>Description: Preview PRs for gh-pagesBuild-pull-requests-for-this-project: trueEnvironment Variables:
# REQUIREDGITHUB_WORKFLOW: call-jekyll-build / Build JekyllSITE_ARTIFACT: prep.zip # the name of the artifact to look for in the workflow# OPTIONALCONFIG_FILE: _config.ymlEXTRACT_ARCHIVE: pre_built_database.zip # if there is a nested archive to extractGITHUB_TIMEOUT: 10# timeout in minutes to use when searching for GitHub artifacts, max 15THEME_REF: masterAdditionally, do the following:
- Deactivate the
stableversion - Make the
latestversion hidden - Update branch protection rules in GitHub repo settings to require status checks from ReadTheDocs
- Add the below
.readthedocs.yamlfile to the root of the repo, or a custom path as specified in the project settings
---
# Read the Docs configuration file# See https://docs.readthedocs.io/en/stable/config-file/v2.html for detailsversion: 2build:
os: ubuntu-24.04tools:
ruby: "3.3"apt_packages:
- 7zip
- jqjobs:
install:
- | mkdir -p "./tmp" branch="master" base_url="https://raw.githubusercontent.com/LizardByte/LizardByte.github.io" url="${base_url}/refs/heads/${branch}/scripts/readthedocs_build.sh" curl -sSL -o "./tmp/readthedocs_build.sh" "${url}" chmod +x "./tmp/readthedocs_build.sh"build:
html:
- "./tmp/readthedocs_build.sh"