Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/production'
Browse files Browse the repository at this point in the history
  • Loading branch information
jakee417 committed Jun 15, 2024
2 parents 4aaf6ce + 20987f2 commit e66f333
Show file tree
Hide file tree
Showing 74 changed files with 1,114 additions and 773 deletions.
17 changes: 17 additions & 0 deletions .github/DISCUSSION_TEMPLATE/general.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
body:
- type: checkboxes
attributes:
label: Checklist
description: Following the guidelines can make you more likely to get responses.
options:
- label: >-
I have read and accepted the
[contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
required: true
- type: textarea
attributes:
label: Description
description: Please describe in detail what you want to share.
validations:
required: true
7 changes: 7 additions & 0 deletions .github/DISCUSSION_TEMPLATE/ideas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
body:
- type: textarea
attributes:
label: Description
description: Please describe in detail what you want to share.
validations:
required: true
9 changes: 4 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
versioning-strategy: increase
groups:
bundler:
dependency-type: "production"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
versioning-strategy: increase
groups:
npm:
dependency-type: "development"
update-types:
- "major"
- "minor"
- "patch"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CD

on:
push:
branches:
- production
tags-ignore:
- "**"

jobs:
release:
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- 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 }}
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "CI"
on:
push:
branches:
- "master"
- "hotfix/**"
paths-ignore:
- ".github/**"
- "!.github/workflows/ci.yml"
- ".gitignore"
- "docs/**"
- "README.md"
- "LICENSE"
pull_request:

jobs:
build:
runs-on: ubuntu-latest

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

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # for posts's lastmod

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- 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
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: "CodeQL"

on:
push:
branches: ["master"]
paths: ["_javascript/**/*.js"]
pull_request:
paths: ["_javascript/**/*.js"]
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6
4 changes: 2 additions & 2 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
ruby-version: 3.3
bundler-cache: true

- name: Build site
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Test site
run: |
bundle exec htmlproofer _site \
\-\-disable-external=true \
\-\-disable-external \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- name: Upload site artifact
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish

on:
push:
branches:
- docs
workflow_call:
secrets:
GH_PAT:
required: true
BUILDER:
required: true

jobs:
launch:
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 }}"}}'
73 changes: 73 additions & 0 deletions .github/workflows/starter/pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: "Build and Deploy"
on:
push:
branches:
- main
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

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

- name: Build site
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: "production"

- name: Test site
run: |
bundle exec htmlproofer _site \
\-\-disable-external \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- name: Upload site artifact
uses: actions/upload-pages-artifact@v3
with:
path: "_site${{ steps.pages.outputs.base_path }}"

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
23 changes: 23 additions & 0 deletions .github/workflows/style-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Style Lint"

on:
push:
branches: ["master", "hotfix/**"]
paths: ["_sass/**/*.scss"]
pull_request:
paths: ["_sass/**/*.scss"]

jobs:
stylelint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- run: npm i
- run: npm test
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Gemfile.lock

# Jekyll cache
.jekyll-cache
.jekyll-metadata
_site

# RubyGems
Expand All @@ -16,8 +17,12 @@ package-lock.json

# IDE configurations
.idea
.vscode
!.vscode/settings.json
!.vscode/extensions.json

# Misc
_sass/dist
assets/js/dist
assets/.DS_Store
assets/.DS_Store
Expand Down
16 changes: 1 addition & 15 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,5 @@ source "https://rubygems.org"
gemspec

group :test do
gem "html-proofer", "~> 4.4"
gem "html-proofer", "~> 5.0"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
17 changes: 13 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ analytics:
id: # fill in your Google Analytics ID
goatcounter:
id: # fill in your GoatCounter ID
umami:
id: # fill in your Umami ID
domain: # fill in your Umami domain
matomo:
id: # fill in your Matomo ID
domain: # fill in your Matomo domain
cloudflare:
id: # fill in your Cloudflare Web Analytics token

# Pageviews settings
pageviews:
Expand All @@ -80,12 +88,12 @@ pageviews:
#
theme_mode: # [light | dark]

# The CDN endpoint for images.
# The CDN endpoint for media resources.
# Notice that once it is assigned, the CDN url
# will be added to all image (site avatar & posts' images) paths starting with '/'
# will be added to all media resources (site avatar, posts' images, audio and video files) paths starting with '/'
#
# e.g. 'https://cdn.com'
img_cdn:
img:

# the avatar on sidebar, support local or CORS resources
avatar:
Expand Down Expand Up @@ -145,6 +153,7 @@ baseurl: ""
# ------------ The following options are not recommended to be modified ------------------

kramdown:
footnote_backlink: "&#8617;&#xfe0e;"
syntax_highlighter: rouge
syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
css_class: highlight
Expand Down Expand Up @@ -205,7 +214,7 @@ exclude:
- tools
- README.md
- LICENSE
- rollup.config.js
- "*.config.js"
- package*.json

jekyll-archives:
Expand Down
Loading

0 comments on commit e66f333

Please sign in to comment.