-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Implement generic Jekyll site
Signed-off-by: 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
- Loading branch information
Showing
33 changed files
with
678 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# GitHub Actions workflow for deploying Jekyll site to GitHub Pages | ||
# | ||
# References: | ||
# | ||
# * Workflow syntax for GitHub Actions - GitHub Docs | ||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | ||
# | ||
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com> | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
name: Deploy Jekyll site to GitHub Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3' | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
cache-version: 0 # Increment this number if you need to re-download cached gems | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v5 | ||
- name: Patch site URL | ||
run: |- | ||
sed \ | ||
--in-place \ | ||
--regexp-extended \ | ||
--expression='s@brlin\.me@brlin-tw.github.io@' \ | ||
_config.yml | ||
- name: Build with Jekyll | ||
# Outputs to the './_site' directory by default | ||
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | ||
env: | ||
JEKYLL_ENV: production | ||
- name: Upload artifact | ||
# Automatically uploads an artifact from the './_site' directory by default | ||
uses: actions/upload-pages-artifact@v3 | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,50 @@ | ||
# Markdownlint(Node.js variant) configuration file | ||
# https://github.com/igorshubovych/markdownlint-cli#configuration | ||
# | ||
# This file is based on The Common Markdownlint(Node.js variant) Configuration Templates project | ||
# https://github.com/Lin-Buo-Ren/common-markdownlint-nodejs-config-templates | ||
# This file is based on The Common Markdownlint(Node.js variant) | ||
# Configuration Templates project | ||
# https://github.com/the-common/markdownlint-nodejs-config-templates | ||
# | ||
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com> | ||
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com> | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
|
||
# Inherit Markdownlint rules | ||
default: True | ||
|
||
# Only allow consistent un-ordered list bullet style(allow alternations in sub-levels) | ||
MD004: | ||
# Only allow consistent un-ordered list bullet style(allow alternations | ||
# in sub-levels) | ||
ul-style: | ||
style: sublist | ||
|
||
# Only allow 4 spaces as indentation of lists | ||
MD007: | ||
ul-indent: | ||
indent: 4 | ||
|
||
# Only allow 2 spaces as linebreak sequence | ||
MD009: | ||
no-trailing-spaces: | ||
br_spaces: 2 | ||
|
||
# Disable line length limitation(not suitable with CJK context) | ||
MD013: False | ||
line-length: False | ||
|
||
# Allow missing padding blank line between the heading markup and the context | ||
MD022: False | ||
blanks-around-headings: False | ||
|
||
# Allow duplicated non-sibling heading text | ||
MD024: | ||
no-duplicate-heading: | ||
siblings_only: True | ||
|
||
# Allow missing padding blank line between a list and its context | ||
MD032: False | ||
blanks-around-lists: False | ||
|
||
# Allow using raw HTML markups as workarounds of deficiencies of Markdown | ||
MD033: False | ||
no-inline-html: False | ||
|
||
# Allow using YAML front matter, while not require the definition of the | ||
# `title` property | ||
MD041: | ||
first-line-h1: | ||
front_matter_title: '.*' | ||
|
||
single-title: | ||
# Workaround for the layouts step | ||
front_matter_title: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.