Skip to content

Commit

Permalink
Move CI to GitHub Actions (#122)
Browse files Browse the repository at this point in the history
* Move CI to GitHub Actions

* Drop --dryrun

* Add html-proofer to gemfile
  • Loading branch information
Brian J. Cardiff authored Dec 3, 2020
1 parent 37fa6fd commit 850670d
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 47 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy
on:
push:
pull_request:
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Download source
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/bundle
tmp/.htmlproofer
key: gem-${{ hashFiles('Gemfile.lock') }}
restore-keys: gem-
- name: Build website
run: |
mv docker-compose.ci.yml docker-compose.override.yml
docker-compose run --rm web /bin/bash -c "bundle check || bundle install --jobs=3"
docker-compose run --rm web make check_html
docker-compose run --rm web /bin/bash -c "make check_external_links || true" # allowed to fail
- name: Configure AWS Credentials
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/unstable')
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy to www.crystal-lang.org
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
aws s3 sync ./_site s3://crystal-website --delete
- name: Deploy to stg.crystal-lang.org
if: github.event_name == 'push' && github.ref == 'refs/heads/unstable'
run: |
aws s3 sync ./_site s3://stg.crystal-lang.org --delete
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ gem 'jekyll-assets', '~> 2.4.0'
gem 'jekyll-timeago'
gem 'jekyll-seo-tag'
gem 'haml'
gem 'rouge', git: 'https://github.com/manastech/rouge.git', branch: 'crystal'
gem 'rouge', git: 'https://github.com/manastech/rouge.git', branch: 'crystal'
gem 'html-proofer'
23 changes: 22 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ GEM
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
extras (0.3.0)
forwardable-extended (~> 2.5)
Expand All @@ -24,6 +26,14 @@ GEM
haml (5.0.4)
temple (>= 0.8.0)
tilt
html-proofer (3.17.4)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogumbo (~> 2.0)
parallel (~> 1.3)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -63,10 +73,17 @@ GEM
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_i18n (0.4.0)
mini_portile2 (2.4.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.4)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.20.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.1)
rack (1.6.12)
rainbow (3.0.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
Expand All @@ -81,17 +98,21 @@ GEM
rack (> 1, < 3)
temple (0.8.0)
tilt (2.0.8)
typhoeus (1.4.0)
ethon (>= 0.9.0)
yell (2.2.2)

PLATFORMS
ruby

DEPENDENCIES
haml
html-proofer
jekyll
jekyll-assets (~> 2.4.0)
jekyll-seo-tag
jekyll-timeago
rouge!

BUNDLED WITH
1.16.4
1.17.3
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ exclude:
- "*.haml"
- "*.nix"
- docker-compose.yml
- docker-compose.*.yml
- Gemfile
- Gemfile.lock
- Makefile
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '2'

services:
web:
environment:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
volumes:
- .:/src
- ~/.cache/bundle:/usr/local/bundle
95 changes: 95 additions & 0 deletions gemset.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
};
version = "0.5.1";
};
ethon = {
dependencies = ["ffi"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9";
type = "gem";
};
version = "0.12.0";
};
eventmachine = {
groups = ["default"];
platforms = [];
Expand Down Expand Up @@ -103,6 +114,17 @@
};
version = "5.0.4";
};
html-proofer = {
dependencies = ["addressable" "mercenary" "nokogumbo" "parallel" "rainbow" "typhoeus" "yell"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1wjwr7c19dr7rai44ypqghbakgav91h9swg88cddn7rxf7a6vl3b";
type = "gem";
};
version = "3.17.4";
};
"http_parser.rb" = {
groups = ["default"];
platforms = [];
Expand Down Expand Up @@ -241,6 +263,48 @@
};
version = "0.4.0";
};
mini_portile2 = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy";
type = "gem";
};
version = "2.4.0";
};
nokogiri = {
dependencies = ["mini_portile2"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0xmf60nj5kg9vaj5bysy308687sgmkasgx06vbbnf94p52ih7si2";
type = "gem";
};
version = "1.10.10";
};
nokogumbo = {
dependencies = ["nokogiri"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0pxm7hx2lhmanm8kljd39f1j1742kl0a31zx98jsjiwrkfb5hhc6";
type = "gem";
};
version = "2.0.4";
};
parallel = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0055br0mibnqz0j8wvy20zry548dhkakws681bhj3ycb972awkzd";
type = "gem";
};
version = "1.20.1";
};
pathutil = {
dependencies = ["forwardable-extended"];
groups = ["default"];
Expand Down Expand Up @@ -272,6 +336,16 @@
};
version = "1.6.12";
};
rainbow = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk";
type = "gem";
};
version = "3.0.0";
};
rb-fsevent = {
groups = ["default"];
platforms = [];
Expand Down Expand Up @@ -368,4 +442,25 @@
};
version = "2.0.8";
};
typhoeus = {
dependencies = ["ethon"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz";
type = "gem";
};
version = "1.4.0";
};
yell = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx";
type = "gem";
};
version = "2.2.2";
};
}

0 comments on commit 850670d

Please sign in to comment.