Skip to content

Commit

Permalink
Merge branch 'master' into OldBlog-2
Browse files Browse the repository at this point in the history
Signed-off-by: 念真 <[email protected]>
  • Loading branch information
XiaoWendell authored Nov 22, 2024
2 parents 36d49fa + 9438060 commit 6c873d3
Show file tree
Hide file tree
Showing 369 changed files with 5,053 additions and 17,050 deletions.
5 changes: 0 additions & 5 deletions .browserslistrc

This file was deleted.

8 changes: 0 additions & 8 deletions .commitlintrc.json

This file was deleted.

29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Jekyll",
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": "bash .devcontainer/post-create.sh",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
// Liquid tags auto-complete
"killalau.vscode-liquid-snippets",
// Liquid syntax highlighting and formatting
"Shopify.theme-check-vscode",
// Shell
"timonwong.shellcheck",
"mkhl.shfmt",
// Common formatter
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint",
"yzhang.markdown-all-in-one",
// Git
"mhutchie.git-graph"
]
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

if [ -f package.json ]; then
bash -i -c "nvm install --lts && nvm install-latest-npm"
npm i
npm run build
fi

# Install dependencies for shfmt extension
curl -sS https://webi.sh/shfmt | sh &>/dev/null

# Add OMZ plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc

# Avoid git log use less
echo -e "\nunset LESS" >>~/.zshrc
26 changes: 0 additions & 26 deletions .github/DISCUSSION_TEMPLATE/general.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/DISCUSSION_TEMPLATE/q-a.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/feature_request.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- "assets/js"
26 changes: 0 additions & 26 deletions .github/dependabot.yml

This file was deleted.

41 changes: 32 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
name: CD

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
branches:
- docs
- production
tags-ignore:
- "**"

jobs:
launch:
release:
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- run: |
curl -X POST -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GH_PAT }}" \
https://api.github.com/repos/${{ secrets.BUILDER }}/dispatches \
-d '{"event_type":"deploy", "client_payload":{"branch": "${{ github.ref_name }}"}}'
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true

- uses: actions/setup-node@v4
with:
node-version: latest

- run: npm install
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}

publish:
needs: release
uses: ./.github/workflows/publish.yml
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
BUILDER: ${{ secrets.BUILDER }}
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "CI"
on:
push:
branches-ignore:
- "production"
- "docs"
branches:
- "master"
- "hotfix/**"
paths-ignore:
- ".github/**"
- "!.github/workflows/ci.yml"
Expand All @@ -12,16 +12,14 @@ on:
- "README.md"
- "LICENSE"
pull_request:
paths:
- "**"

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: [2.7, 3]
ruby: ["3.1", "3.2", "3.3"]

steps:
- name: Checkout
Expand All @@ -37,9 +35,11 @@ jobs:

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest

- name: Build Assets
run: npm i && npm run build

- name: Test Site
run: bash tools/test
run: bash tools/test.sh
Loading

0 comments on commit 6c873d3

Please sign in to comment.