Formalize website Ruby dependencies and installation process (#4416)

* Formalize website Ruby dependencies and installation process

* Improve Contributing Guidelines

* Add Gemfile.lock to .gitattributes

* Use 'ruby/setup-ruby' caching strategy

* Add link to documentation of 'bundler-cache'
This commit is contained in:
Álvaro Mondéjar 2020-12-22 21:11:57 +01:00 committed by GitHub
parent 11f55dee6a
commit 740dfba419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 88 additions and 21 deletions

1
.gitattributes vendored
View File

@ -5,6 +5,7 @@
# Don't diff machine generated files
package-lock.json -diff
Gemfile.lock -diff
# Treat images as binary
*.ico binary

View File

@ -30,18 +30,8 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Setup cache for gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Jekyll
run: |
echo -e 'source "https://rubygems.org"\n\ngem "jekyll"' > Gemfile
bundle config set path 'vendor/bundle'
bundle install --jobs 4 --retry 3
# https://github.com/ruby/setup-ruby/blob/master/README.md#caching-bundle-install-automatically
bundler-cache: true
- name: Build website
run: bundle exec jekyll build
test:

13
.gitignore vendored
View File

@ -1,4 +1,4 @@
# Created by https://www.gitignore.io/api/sass,macos,jekyll
# Created by https://www.gitignore.io/api/macos,jekyll
### Jekyll ###
_site/
@ -34,17 +34,16 @@ Network Trash Folder
Temporary Items
.apdisk
### Sass ###
*.css.map
*.sass.map
*.scss.map
# End of https://www.gitignore.io/api/sass,macos,jekyll
# End of https://www.gitignore.io/api/macos,jekyll
# NPM dependencies
node_modules/
### Ruby ###
/.bundle/
/vendor/bundle
# Files generated by build script
icons/*.js
/index.js

View File

@ -244,8 +244,10 @@ If you have an affiliation to the brand you contributing that allows you to spea
## Building Website Locally
* Make sure you have [Ruby](https://www.ruby-lang.org/en/downloads/) installed.
* Make sure you have [Jekyll](https://jekyllrb.com/) installed (using `$ gem install jekyll bundler`). At least version 3.5 is required.
* Build and run the website locally using `$ jekyll serve`.
* Make sure you have [Bundler](https://bundler.io/) installed (using `$ gem install bundler`).
* Set your local gems installation location for the simple-icons website using `$ bundle config set path 'vendor/bundle'`.
* Install dependencies using `$ bundle install`.
* Build and run the website locally using `$ bundle exec jekyll serve`.
* Connect to the website in your browser via the "Server address" provided by the output of this command, e.g. `http://localhost:4000/`
## Testing Package Locally

7
Gemfile Normal file
View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "jekyll", "4.2"

68
Gemfile.lock Normal file
View File

@ -0,0 +1,68 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.7)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.14.1)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jekyll (4.2.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.3.3)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.26.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
jekyll (= 4.2)
BUNDLED WITH
2.2.0