Skip to content

Commit 0c102dd

Browse files
committed
Auto-merge from CI
2 parents 99fbfee + 6249fa4 commit 0c102dd

File tree

8 files changed

+68
-11
lines changed

8 files changed

+68
-11
lines changed

.github/workflows/compileTest.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Compile Test
9+
10+
on:
11+
push:
12+
branches:
13+
- '*'
14+
15+
jobs:
16+
website-deploy:
17+
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
ruby-version: ['2.7']
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Set up Ruby
26+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
27+
with:
28+
ruby-version: ${{ matrix.ruby-version }}
29+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30+
- name: Push
31+
run: bash compile.sh

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
source "http://production.cf.rubygems.org/"
22

3+
ruby '~> 2.7.0'
4+
35
gem 'nanoc', '~> 3.7.4'
46
gem 'rainbow', '~> 2.0.0'
57
gem 'rake', '~> 10.4.2'

Gemfile.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,9 @@ DEPENDENCIES
7171
rainbow (~> 2.0.0)
7272
rake (~> 10.4.2)
7373
rspec (~> 3.1.0)
74+
75+
RUBY VERSION
76+
ruby 2.7.6p219
77+
78+
BUNDLED WITH
79+
2.1.4

Rakefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ namespace :site do
213213
# Commit and push to github
214214
sha = `git log`.match(/[a-z0-9]{40}/)[0]
215215
Dir.chdir(CONFIG["destination"]) do
216-
puts "Pushed updated branch #{DESTINATION_BRANCH} to GitHub Pages"
217216
puts "My work is done, Will I Dream...?"
218217
end
219218
end

Rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ compile '*' do
2323
elsif item[:extension] == 'js'
2424
# don’t filter stylesheets
2525
elsif item[:extension] == 'md'
26+
filter :kramdown
2627
if item[:layout] != nil
2728
#puts "[#{Rainbow(item.reference).red}]\t\t layout '#{Rainbow(item[:layout]).yellow}' requested in front matter"
2829
layout item[:layout]

compile.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
bundle install
6+
7+
bundle exec rake site:deploy

deploy.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
set -e
4+
5+
rm -rf docs
6+
37
git fetch origin
48

59
git log -1
@@ -11,6 +15,7 @@ git config core.mergeoptions --no-edit
1115
git checkout source
1216

1317
git update-index --assume-unchanged ./.github/workflows/publish.yml
18+
1419
git merge origin/deploy --strategy-option ours --no-ff --no-edit --allow-unrelated-histories -m "Auto-merge from CI "
1520

1621
git checkout deploy
@@ -21,18 +26,15 @@ git merge source --strategy-option ours --no-ff --no-edit --allow-unrelated-hist
2126

2227
git pull . source --allow-unrelated-histories
2328

24-
set -e
25-
26-
bundle install
2729

28-
bundle exec rake site:deploy
30+
bash compile.sh
2931

3032
set +e
3133

3234
git add --all .
3335

3436
git commit -a -m"Update for deploy"
3537

36-
git push origin deploy
38+
git push --force
3739

3840
git checkout source

launch.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
#!/bin/bash
22
set -e
3-
sudo apt install gnupg2
4-
gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
5-
\curl -sSL https://get.rvm.io | bash -s stable
6-
~/.rvm/bin/rvm pkg install openssl
7-
~/.rvm/bin/rvm install 2.7.6 --with-openssl-dir=$HOME/.rvm/usr
3+
4+
FILE=~/.rvm/scripts/rvm
5+
if [ -f "$FILE" ]; then
6+
echo "$FILE exists."
7+
else
8+
echo "$FILE does not exist."
9+
sudo apt install gnupg2
10+
gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
11+
\curl -sSL https://get.rvm.io | bash -s stable
12+
~/.rvm/bin/rvm pkg install openssl
13+
~/.rvm/bin/rvm install 2.7.6 --with-openssl-dir=$HOME/.rvm/usr
14+
fi
15+
~/.rvm/bin/rvm install ruby-2.7.6
16+
source $FILE
817
bundle install;
918
bundle exec nanoc view & bundle exec guard;

0 commit comments

Comments
 (0)