Skip to content

Commit

Permalink
Migrate to Middleman 4, CocoaPods 1.11.0.beta.2 and GH actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins authored and dnkoutso committed Aug 12, 2021
1 parent 5c66932 commit 26954a1
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 110 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 1,39 @@
name: Deploy

jobs:
specs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
ruby: [2.6]

name: ${{ matrix.os }} / Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout git
uses: actions/checkout@v1

- name: Set up Ruby
uses: ruby/setup-ruby@v1
if: ${{ matrix.ruby != 'system' }}
with:
ruby-version: ${{ matrix.ruby }}

- name: Update git submodules
run: git submodule update --init

- name: Run bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without debugging documentation
- name: Deploy
run: |
git remote set-url origin "https://${GH_TOKEN}@github.com/CocoaPods/guides.cocoapods.org.git"
bundle exec rake deploy
on:
push:
branches:
- "master"
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

24 changes: 14 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,31 1,35 @@
source 'https://rubygems.org'

git_source(:github) {|repo_name| "https://github.com/#{repo_name}.git" }
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }

gem 'middleman'
gem 'middleman', '~> 4.0'

gem 'middleman-rouge'
gem 'middleman-gh-pages', git: 'https://github.com/orta/middleman-gh-pages.git'
gem 'middleman-livereload'
gem 'middleman-sprockets'
gem 'middleman-gh-pages', :git => 'https://github.com/orta/middleman-gh-pages.git'
gem 'middleman-livereload', '3.4.6'
gem 'middleman-syntax'

gem 'redcarpet', github: 'vmg/redcarpet', ref: 'cef9abbcc411d07fd1b8c80e348a80efde2db323'
gem 'rake'
gem 'redcarpet', github: 'vmg/redcarpet', ref: 'cef9abbcc411d07fd1b8c80e348a80efde2db323'
gem 'sass'

gem 'slim', '< 2.0'
gem 'slim'
gem 'yard', '~> 0.8.6.2'

gem 'activesupport'
gem 'pygments.rb', '~> 0.6.0'
# We need to use 2.0.9 and not 2.0.10 because of a regression.
# See: https://github.com/rtomayko/tilt/issues/347
gem 'tilt', '2.0.9'

gem 'activesupport', '~> 5.0'
gem 'github-markup'
gem 'nokogiri'
gem 'pygments.rb', '~> 0.6.0'

gem 'concurrent-ruby'

gem 'therubyracer'

gem 'cocoapods', '1.10.0'
gem 'cocoapods', '1.11.0.beta.2'

group :development do
gem 'foreman'
Expand Down
101 changes: 52 additions & 49 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 16,23 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
activesupport (5.2.4.4)
activesupport (5.2.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
backports (3.19.0)
backports (3.21.0)
claide (1.0.3)
cocoapods (1.10.0)
addressable (~> 2.6)
cocoapods (1.11.0.beta.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.10.0)
cocoapods-core (= 1.11.0.beta.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -43,19 43,19 @@ GEM
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.19.0, < 2.0)
cocoapods-core (1.10.0)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.0.beta.2)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
Expand All @@ -71,28 71,27 @@ GEM
execjs
coffee-script-source (1.12.2)
colored2 (3.1.2)
concurrent-ruby (1.1.7)
concurrent-ruby (1.1.9)
contracts (0.13.0)
dotenv (2.7.6)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
escape (0.0.4)
escape_utils (1.2.1)
ethon (0.12.0)
ffi (>= 1.3.0)
ethon (0.14.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.7.0)
execjs (2.8.1)
fast_blank (1.0.0)
fastimage (2.2.1)
ffi (1.14.2)
fastimage (2.2.5)
ffi (1.15.3)
foreman (0.87.2)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
github-markup (3.0.5)
haml (5.2.1)
github-markup (4.0.0)
haml (5.2.2)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
Expand All @@ -103,7 102,7 @@ GEM
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.5.1)
kramdown (2.3.0)
kramdown (2.3.1)
rexml
libv8 (3.16.14.19)
listen (3.0.8)
Expand Down Expand Up @@ -141,25 140,25 @@ GEM
servolux
tilt (~> 2.0.9)
uglifier (~> 3.0)
middleman-livereload (3.4.6)
middleman-livereload (3.4.7)
em-websocket (~> 0.5.1)
middleman-core (>= 3.3)
rack-livereload (~> 0.3.15)
middleman-rouge (0.0.1)
middleman-core (>= 3.0.0)
redcarpet (>= 2.2.0)
rouge (>= 0.3.0)
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
mini_portile2 (2.4.0)
minitest (5.14.2)
molinillo (0.6.6)
middleman-syntax (3.2.0)
middleman-core (>= 3.2)
rouge (~> 3.2)
mini_portile2 (2.6.1)
minitest (5.14.4)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.12.3)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.13.3.4)
Expand All @@ -172,17 171,18 @@ GEM
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
racc (1.5.2)
rack (2.2.3)
rack-livereload (0.3.17)
rack
rake (13.0.3)
rb-fsevent (0.10.4)
rake (13.0.6)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
ref (2.0.0)
rexml (3.2.4)
rexml (3.2.5)
rouge (3.26.0)
ruby-macho (1.4.0)
ruby-macho (2.5.1)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
Expand All @@ -191,55 191,58 @@ GEM
sassc (2.4.0)
ffi (~> 1.9)
servolux (0.13.0)
slim (0.6.1)
escape_utils
slim (4.1.0)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
temple (0.8.2)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (1.0.1)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
tilt (2.0.9)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
xcodeproj (1.19.0)
xcodeproj (1.21.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
yajl-ruby (1.2.3)
yard (0.8.6.2)

PLATFORMS
ruby

DEPENDENCIES
activesupport
cocoapods (= 1.10.0)
activesupport (~> 5.0)
cocoapods (= 1.11.0.beta.2)
concurrent-ruby
foreman
github-markup
middleman
middleman (~> 4.0)
middleman-gh-pages!
middleman-livereload (= 3.4.6)
middleman-rouge
middleman-livereload
middleman-sprockets
middleman-syntax
nokogiri
pygments.rb (~> 0.6.0)
rake
redcarpet!
sass
slim (< 2.0)
slim
therubyracer
tilt (= 2.0.9)
yard (~> 0.8.6.2)

BUNDLED WITH
2.1.4
2.2.8
22 changes: 12 additions & 10 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 24,8 @@
set :markdown_engine, :redcarpet

activate :automatic_image_sizes
activate :rouge_syntax
activate :syntax
activate :sprockets

activate :breaking_source
activate :add_links_to_navigation
Expand All @@ -41,19 42,22 @@

def shared_partial(*sources)
sources.inject([]) do |combined, source|
combined << partial("../shared/includes/#{source}",:locals => { :guides => true })
# Partials in Middleman 4 are always loaded within the 'source' folder. We have now added a symlink
# of shared resourecs into it that points to the git submodule at the root of this repo.
# See: https://middlemanapp.com/basics/upgrade-v4/
combined << partial("shared/includes/#{source}",:locals => { :guides => true })
end.join
end

end

# Allow shared assets folder to not be in source, thereby not dragging in every asset
after_configuration do
sprockets.append_path "../shared/img"
sprockets.append_path "../shared/js"
sprockets.append_path "../shared/fonts"
sprockets.append_path "../shared/includes"
sprockets.append_path "../shared/sass"
sprockets.append_path "shared/img"
sprockets.append_path "shared/js"
sprockets.append_path "shared/fonts"
sprockets.append_path "shared/includes"
sprockets.append_path "shared/sass"
end

navigation_data = {
Expand All @@ -63,8 67,6 @@ def shared_partial(*sources)
],
}

content_for :dsl_data do navigation_data * '<br>' end

# Dynamic pages for documentation, Pod, command line

navigation_data['dsl'].each do |dsl|
Expand All @@ -81,4 83,4 @@ def shared_partial(*sources)
:ignore => true,
}

data.store("site", "guides")
data.store(:site, ["guides"])
Loading

0 comments on commit 26954a1

Please sign in to comment.