2023-03-14 01:25:42 +08:00
|
|
|
name: "CI"
|
2020-01-22 03:05:06 +08:00
|
|
|
on:
|
|
|
|
push:
|
2024-04-14 04:16:15 +08:00
|
|
|
branches:
|
|
|
|
- "master"
|
2024-05-17 20:11:08 +08:00
|
|
|
- "hotfix/**"
|
2020-01-22 03:05:06 +08:00
|
|
|
paths-ignore:
|
2023-03-14 01:25:42 +08:00
|
|
|
- ".github/**"
|
|
|
|
- "!.github/workflows/ci.yml"
|
|
|
|
- ".gitignore"
|
2023-08-19 12:51:22 +08:00
|
|
|
- "docs/**"
|
2023-03-14 01:25:42 +08:00
|
|
|
- "README.md"
|
|
|
|
- "LICENSE"
|
2020-01-22 03:05:06 +08:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2022-03-04 22:58:42 +08:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-08-13 17:47:30 -04:00
|
|
|
|
2023-12-27 23:56:39 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-21 00:22:01 +08:00
|
|
|
ruby: ["3.1", "3.2", "3.3"]
|
2023-12-27 23:56:39 +08:00
|
|
|
|
2020-11-23 01:26:29 +08:00
|
|
|
steps:
|
2020-01-22 03:05:06 +08:00
|
|
|
- name: Checkout
|
2023-09-09 20:58:40 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-04-10 03:15:51 +08:00
|
|
|
with:
|
2023-03-14 01:25:42 +08:00
|
|
|
fetch-depth: 0 # for posts's lastmod
|
2022-08-13 17:47:30 -04:00
|
|
|
|
2020-11-23 01:26:29 +08:00
|
|
|
- name: Setup Ruby
|
2021-04-01 04:17:18 +08:00
|
|
|
uses: ruby/setup-ruby@v1
|
2020-11-23 01:26:29 +08:00
|
|
|
with:
|
2023-12-27 23:56:39 +08:00
|
|
|
ruby-version: ${{ matrix.ruby }}
|
2021-04-01 04:17:18 +08:00
|
|
|
bundler-cache: true
|
2022-08-13 17:47:30 -04:00
|
|
|
|
2023-03-14 01:25:42 +08:00
|
|
|
- name: Setup Node
|
2023-10-24 03:43:40 +08:00
|
|
|
uses: actions/setup-node@v4
|
2024-04-21 01:17:35 +08:00
|
|
|
with:
|
2024-07-18 01:20:17 +08:00
|
|
|
node-version: lts/*
|
2023-03-14 01:25:42 +08:00
|
|
|
|
|
|
|
- name: Build Assets
|
|
|
|
run: npm i && npm run build
|
|
|
|
|
2020-01-22 03:05:06 +08:00
|
|
|
- name: Test Site
|
2024-06-01 04:11:01 +08:00
|
|
|
run: bash tools/test.sh
|