Skip to content

Commit 6dc2c69

Browse files
committed
Merge remote-tracking branch 'upstream/main' into main
# Conflicts: # .github/workflows/build.yml # .github/workflows/deploy.yml # README.md # source/index.html.md
2 parents c9a6086 + 24b1d1f commit 6dc2c69

File tree

11 files changed

+456
-33
lines changed

11 files changed

+456
-33
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: ${{ matrix.ruby-version }}
23+
24+
- uses: actions/cache@v2
25+
with:
26+
path: vendor/bundle
27+
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
28+
restore-keys: |
29+
gems-${{ runner.os }}-${{ matrix.ruby-version }}-
30+
gems-${{ runner.os }}-
31+
32+
# necessary to get ruby 2.3 to work nicely with bundler vendor/bundle cache
33+
# can remove once ruby 2.3 is no longer supported
34+
- run: gem update --system
35+
36+
- run: bundle config set deployment 'true'
37+
- name: bundle install
38+
run: |
39+
bundle config path vendor/bundle
40+
bundle install --jobs 4 --retry 3
41+
42+
- run: bundle exec middleman build

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [ 'main' ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
env:
11+
ruby-version: 2.5
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: ${{ env.ruby-version }}
19+
20+
- uses: actions/cache@v2
21+
with:
22+
path: vendor/bundle
23+
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
24+
restore-keys: |
25+
gems-${{ runner.os }}-${{ matrix.ruby-version }}-
26+
gems-${{ runner.os }}-
27+
28+
- run: bundle config set deployment 'true'
29+
- name: bundle install
30+
run: |
31+
bundle config path vendor/bundle
32+
bundle install --jobs 4 --retry 3
33+
34+
- run: bundle exec middleman build
35+
36+
- name: Deploy
37+
uses: peaceiris/actions-gh-pages@v3
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: ./build
41+
keep_files: true

.github/workflows/dev_deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Dev Deploy
2+
3+
on:
4+
push:
5+
branches: [ 'dev' ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
env:
11+
ruby-version: 2.5
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: ${{ env.ruby-version }}
19+
20+
- uses: actions/cache@v2
21+
with:
22+
path: vendor/bundle
23+
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
24+
restore-keys: |
25+
gems-${{ runner.os }}-${{ matrix.ruby-version }}-
26+
gems-${{ runner.os }}-
27+
28+
- run: bundle config set deployment 'true'
29+
- name: bundle install
30+
run: |
31+
bundle config path vendor/bundle
32+
bundle install --jobs 4 --retry 3
33+
34+
- run: bundle exec middleman build
35+
36+
- name: Push to Docker Hub
37+
uses: docker/build-push-action@v1
38+
with:
39+
username: ${{ secrets.DOCKER_USERNAME }}
40+
password: ${{ secrets.DOCKER_ACCESS_KEY }}
41+
repository: slatedocs/slate
42+
tag_with_ref: true
43+
44+
- name: Deploy
45+
uses: peaceiris/[email protected]
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
destination_dir: dev
49+
publish_dir: ./build
50+
keep_files: true

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Docker image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
push_to_registry:
9+
name: Push Docker image to Docker Hub
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out the repo
13+
uses: actions/checkout@v2
14+
15+
- name: Push to Docker Hub
16+
uses: docker/build-push-action@v1
17+
with:
18+
username: ${{ secrets.DOCKER_USERNAME }}
19+
password: ${{ secrets.DOCKER_ACCESS_KEY }}
20+
repository: slatedocs/slate
21+
tag_with_ref: true
22+
tags: latest

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## Version 2.8.0
4+
5+
*October 27, 2020*
6+
7+
* Remove last trailing newline when using the copy code button
8+
* Rework docker image and make available at slatedocs/slate
9+
* Improve Dockerfile layout to improve caching (thanks @micvbang)
10+
* Bump rouge from 3.20 to 3.24
11+
* Bump nokogiri from 1.10.9 to 1.10.10
12+
* Bump middleman from 4.3.8 to 4.3.11
13+
* Bump lunr.js from 2.3.8 to 2.3.9
14+
315
## Version 2.7.1
416

517
*August 13, 2020*

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ FROM ruby:2.6-slim
22

33
WORKDIR /srv/slate
44

5+
VOLUME /srv/slate/build
56
VOLUME /srv/slate/source
7+
68
EXPOSE 4567
79

8-
COPY . /srv/slate
10+
COPY Gemfile .
11+
COPY Gemfile.lock .
912

1013
RUN apt-get update \
1114
&& apt-get install -y --no-install-recommends \
@@ -17,4 +20,9 @@ RUN apt-get update \
1720
&& apt-get autoremove -y \
1821
&& rm -rf /var/lib/apt/lists/*
1922

20-
CMD ["bundle", "exec", "middleman", "server", "--watcher-force-polling"]
23+
COPY . /srv/slate
24+
25+
RUN chmod +x /srv/slate/slate.sh
26+
27+
ENTRYPOINT ["/srv/slate/slate.sh"]
28+
CMD ["build"]

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gem 'middleman', '~>4.3'
66
gem 'middleman-syntax', '~> 3.2'
77
gem 'middleman-autoprefixer', '~> 2.7'
88
gem 'middleman-sprockets', '~> 4.1'
9-
gem 'rouge', '~> 3.20'
9+
gem 'rouge', '~> 3.21'
1010
gem 'redcarpet', '~> 3.5.0'
1111
gem 'nokogiri', '~> 1.10.8'
1212
gem 'sass'

Gemfile.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (5.2.4.3)
4+
activesupport (5.2.4.4)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 0.7, < 2)
77
minitest (~> 5.1)
@@ -10,7 +10,7 @@ GEM
1010
public_suffix (>= 2.0.2, < 5.0)
1111
autoprefixer-rails (9.5.1.1)
1212
execjs
13-
backports (3.18.1)
13+
backports (3.18.2)
1414
coffee-script (2.4.1)
1515
coffee-script-source
1616
execjs
@@ -37,18 +37,18 @@ GEM
3737
rb-fsevent (~> 0.9, >= 0.9.4)
3838
rb-inotify (~> 0.9, >= 0.9.7)
3939
memoist (0.16.2)
40-
middleman (4.3.8)
40+
middleman (4.3.11)
4141
coffee-script (~> 2.2)
4242
haml (>= 4.0.5)
4343
kramdown (>= 2.3.0)
44-
middleman-cli (= 4.3.8)
45-
middleman-core (= 4.3.8)
44+
middleman-cli (= 4.3.11)
45+
middleman-core (= 4.3.11)
4646
middleman-autoprefixer (2.10.1)
4747
autoprefixer-rails (~> 9.1)
4848
middleman-core (>= 3.3.3)
49-
middleman-cli (4.3.8)
49+
middleman-cli (4.3.11)
5050
thor (>= 0.17.0, < 2.0)
51-
middleman-core (4.3.8)
51+
middleman-core (4.3.11)
5252
activesupport (>= 4.2, < 6.0)
5353
addressable (~> 2.3)
5454
backports (~> 3.6)
@@ -78,8 +78,8 @@ GEM
7878
middleman-core (>= 3.2)
7979
rouge (~> 3.2)
8080
mini_portile2 (2.4.0)
81-
minitest (5.14.1)
82-
nokogiri (1.10.9)
81+
minitest (5.14.2)
82+
nokogiri (1.10.10)
8383
mini_portile2 (~> 2.4.0)
8484
padrino-helpers (0.13.3.4)
8585
i18n (~> 0.6, >= 0.6.7)
@@ -88,14 +88,14 @@ GEM
8888
padrino-support (0.13.3.4)
8989
activesupport (>= 3.1)
9090
parallel (1.19.2)
91-
public_suffix (4.0.5)
91+
public_suffix (4.0.6)
9292
rack (2.2.3)
9393
rb-fsevent (0.10.4)
9494
rb-inotify (0.10.1)
9595
ffi (~> 1.0)
9696
redcarpet (3.5.0)
9797
rexml (3.2.4)
98-
rouge (3.20.0)
98+
rouge (3.24.0)
9999
sass (3.7.4)
100100
sass-listen (~> 4.0.0)
101101
sass-listen (4.0.0)
@@ -126,7 +126,7 @@ DEPENDENCIES
126126
middleman-syntax (~> 3.2)
127127
nokogiri (~> 1.10.8)
128128
redcarpet (~> 3.5.0)
129-
rouge (~> 3.20)
129+
rouge (~> 3.21)
130130
sass
131131

132132
RUBY VERSION

0 commit comments

Comments
 (0)