Skip to content

Commit 67927a0

Browse files
committed
Move the CI to Github Actions.
1 parent 86c324d commit 67927a0

File tree

5 files changed

+88
-25
lines changed

5 files changed

+88
-25
lines changed

Diff for: .github/workflows/ci.yml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: build
2+
on:
3+
push:
4+
paths-ignore:
5+
- 'docs/**'
6+
- 'README.md'
7+
- 'LICENSE'
8+
- '.travis.yml'
9+
pull_request:
10+
paths:
11+
- "**"
12+
13+
jobs:
14+
ci:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest]
19+
20+
steps:
21+
- uses: actions/setup-ruby@v1
22+
with:
23+
ruby-version: 2.6
24+
25+
- uses: actions/setup-python@v1
26+
with:
27+
python-version: 3.7.6
28+
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
32+
- name: Bundle Caching
33+
id: bundle-cache
34+
uses: actions/cache@v1
35+
with:
36+
path: vendor/bundle
37+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
38+
restore-keys: |
39+
${{ runner.os }}-gems-
40+
41+
- name: Pip caching
42+
id: pip-cache
43+
uses: actions/cache@v1
44+
with:
45+
# the path from: pip show pip | grep Location
46+
path: ${{ runner.tool_cache }}/Python/3.7.6/x64/lib/python3.7/site-packages
47+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
48+
restore-keys: |
49+
${{ runner.os }}-pip-
50+
51+
- name: Install gnu-coreutils for macOS
52+
if: runner.os == 'macOS'
53+
run: |
54+
brew install coreutils
55+
56+
- name: Bundle config
57+
run: |
58+
bundle config path vendor/bundle
59+
60+
- name: Bundle Install
61+
if: steps.bundle-cache.outputs.cache-hit != 'true'
62+
run: |
63+
bundle install
64+
65+
- name: Bundle Install locally
66+
if: steps.bundle-cache.outputs.cache-hit == 'true'
67+
run: |
68+
bundle install --local
69+
70+
- name: Pip installing
71+
if: steps.pip-cache.outputs.cache-hit != 'true'
72+
run: |
73+
pip install -r _scripts/py/requirements.txt
74+
75+
- name: Build Site
76+
run: |
77+
bash tools/build.sh
78+
79+
- name: Test Site
80+
run: |
81+
bash tools/test.sh

Diff for: .travis.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ addons:
1717
- libcurl4-openssl-dev # required to avoid SSL error (for htmlproofer)
1818

1919
script:
20-
- bash _scripts/travis/cibuild.sh
20+
- >-
21+
git clone https://${GH_PAT}@github.com/${GH_USER}/${BUILDER_REPO}.git
22+
${HOME}/${BUILDER_REPO} --depth=1 -q
23+
- cp -r ${HOME}/${BUILDER_REPO}/framework/* .
24+
- bash _cibuild.sh
2125

2226
branches:
2327
only: master

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Jekyll Theme Chirpy
22

3-
[![Build Status](https://travis-ci.com/cotes2020/jekyll-theme-chirpy.svg?branch=master)](https://travis-ci.com/cotes2020/jekyll-theme-chirpy)
3+
[![Build Status](https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?event=push)](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=event%3Apush)
44
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
55
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
66

Diff for: _scripts/travis/cibuild.sh

-22
This file was deleted.

Diff for: docs/README_zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Jekyll Theme Chirpy
22

3-
[![Build Status](https://travis-ci.com/cotes2020/jekyll-theme-chirpy.svg?branch=master)](https://travis-ci.com/cotes2020/jekyll-theme-chirpy)
3+
[![Build Status](https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?event=push)](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=event%3Apush)
44
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
55
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
66

0 commit comments

Comments
 (0)