File tree Expand file tree Collapse file tree 2 files changed +30
-41
lines changed Expand file tree Collapse file tree 2 files changed +30
-41
lines changed Original file line number Diff line number Diff line change @@ -24,42 +24,38 @@ jobs:
24
24
matrix :
25
25
os : [ubuntu-latest, macos-latest]
26
26
27
- steps :
28
- - uses : actions/setup-ruby@v1
29
- with :
30
- ruby-version : ' 2.6.x'
27
+ env :
28
+ GEMS_PATH : ~/vendor/bundle
31
29
30
+ steps :
32
31
- name : Checkout
33
32
uses : actions/checkout@v2
34
33
with :
35
- fetch-depth : 0
34
+ fetch-depth : 0 # for posts's lastmod
35
+
36
+ - name : Setup Ruby
37
+ uses : actions/setup-ruby@v1
38
+ with :
39
+ ruby-version : 2.6.x
36
40
37
41
- name : Bundle Caching
38
- id : bundle-cache
39
- uses : actions/cache@v1
42
+ uses : actions/cache@v2
40
43
with :
41
- path : vendor/bundle
44
+ path : ${{ env.GEMS_PATH }}
42
45
key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
43
46
restore-keys : |
44
47
${{ runner.os }}-gems-
45
48
46
- - name : Bundle config
47
- run : |
48
- bundle config path vendor/bundle
49
-
50
49
- name : Bundle Install
51
- if : steps.bundle-cache.outputs.cache-hit != 'true'
52
- run : |
53
- bundle install
54
-
55
- - name : Bundle Install locally
56
- if : steps.bundle-cache.outputs.cache-hit == 'true'
57
50
run : |
58
- bundle install --local
51
+ bundle config path ${{ env.GEMS_PATH }}
52
+ bundle install --jobs 4 --retry 3
59
53
60
54
- name : Build Site
55
+ env :
56
+ JEKYLL_ENV : production
61
57
run : |
62
- JEKYLL_ENV=production bundle exec jekyll b
58
+ bundle exec jekyll b
63
59
64
60
- name : Test Site
65
61
run : |
Original file line number Diff line number Diff line change @@ -14,40 +14,31 @@ jobs:
14
14
runs-on: ubuntu-latest
15
15
16
16
env:
17
- GEMS_PATH: /tmp /bundle
17
+ GEMS_PATH: ~/vendor /bundle
18
18
19
19
steps:
20
- - uses: actions/setup-ruby@v1
21
- with:
22
- ruby-version: 2.6.x
23
-
24
20
- name: Checkout
25
21
uses: actions/checkout@v2
26
22
with:
27
- fetch-depth: 0
23
+ fetch-depth: 0 # for posts's lastmod
24
+
25
+ - name: Setup Ruby
26
+ uses: actions/setup-ruby@v1
27
+ with:
28
+ ruby-version: 2.6.x
28
29
29
30
- name: Bundle Caching
30
- id: bundle-cache
31
- uses: actions/cache@v1
31
+ uses: actions/cache@v2
32
32
with:
33
33
path: ${{ env.GEMS_PATH }}
34
34
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
35
35
restore-keys: |
36
36
${{ runner.os }}-gems-
37
37
38
- - name: Bundle config
39
- run: |
40
- bundle config path ${{ env.GEMS_PATH }}
41
-
42
38
- name: Bundle Install
43
- if: steps.bundle-cache.outputs.cache-hit != 'true'
44
39
run: |
45
- bundle install
46
-
47
- - name: Bundle Install locally
48
- if: steps.bundle-cache.outputs.cache-hit == 'true'
49
- run: |
50
- bundle install --local
40
+ bundle config path ${{ env.GEMS_PATH }}
41
+ bundle install --jobs 4 --retry 3
51
42
52
43
- name: Check baseurl
53
44
run: |
@@ -57,12 +48,14 @@ jobs:
57
48
fi
58
49
59
50
- name: Build Site
51
+ env:
52
+ JEKYLL_ENV: production
60
53
run: |
61
- JEKYLL_ENV=production bundle exec jekyll b
54
+ bundle exec jekyll b
62
55
63
56
if [[ -n $SPEC_TEST ]]; then
64
57
# Bypass the defects of htmlproofer
65
- JEKYLL_ENV=production bundle exec jekyll b -b "" -d "$SPEC_TEST"
58
+ bundle exec jekyll b -b "" -d "$SPEC_TEST"
66
59
fi
67
60
68
61
- name: Test Site
You can’t perform that action at this time.
0 commit comments