Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Gem

on:
release:
types: [released]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Build gem
run: |
gem build github-pages.gemspec
- name: Publish
Copy link
Contributor

@YiMysty YiMysty Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should only run when merge into master branch or tag release I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to instead run the job when we merge into master branch?

on:
  push:
    branches:
      - main

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on:
  release:
    types: [released]

run: |
gem push github-pages.gem --key ${{ secrets.PAGES_GEM_PUBLISH }}
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
strategy:
matrix:
ruby:
- 2.6
- 2.7
- '3.0'
- '3.3'
steps:
- uses: actions/checkout@v4
- name: script/cibuild-docker
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require:
- rubocop-performance

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.0
Exclude:
- 'bin/**/*'
- 'script/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.3
3.3
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG RUBY_VERSION=2.7.3
ARG RUBY_VERSION=3.3
FROM ruby:$RUBY_VERSION

RUN apt-get update \
Expand All @@ -8,6 +8,7 @@ RUN apt-get update \
make \
nodejs

# final version for rubygems-update to supoprt ruby 2.7, consider removing this after upgraded to ruby 3.0
RUN gem update --system

COPY .git /src/gh/pages-gem/.git
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.3-alpine
FROM ruby:3.3-alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe CI is attempting to pass the RUBY_VERSION build arg, but here it's always ruby 3.3.

Either remove the RUBY_VERSION arg from CI and script/cibuild-docker or support it here in Dockerfile.


RUN apk update && apk add --no-cache \
git
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gemspec
gem "jekyll-octicons"

group :test do
gem "rubocop", "~> 0.79"
gem "rubocop", "~> 1.37"
gem "rubocop-performance"
gem "webmock"
end
2 changes: 1 addition & 1 deletion github-pages.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Gem::Specification.new do |s|
s.add_development_dependency("jekyll_test_plugin_malicious", "~> 0.2")
s.add_development_dependency("pry", "~> 0.10")
s.add_development_dependency("rspec", "~> 3.3")
s.add_development_dependency("rubocop-github", "0.16.0")
s.add_development_dependency("rubocop-github", "0.20.0")
end
4 changes: 2 additions & 2 deletions lib/github-pages/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module GitHubPages
class Dependencies
VERSIONS = {
# Jekyll
"jekyll" => "3.9.3",
"jekyll" => "3.9.4",
"jekyll-sass-converter" => "1.5.2",

# Converters
Expand Down Expand Up @@ -63,7 +63,7 @@ def self.version_report
require "nokogiri"

{
"ruby" => RUBY_VERSION,
"ruby" => "3.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will show unexpected values for non-Ruby 3.3 CI.


# Gem versions we're curious about
"github-pages" => VERSION.to_s,
Expand Down
5 changes: 1 addition & 4 deletions script/cibuild-docker
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@

set -ex

# Set the ruby version in the Action definition matrix.
: "${RUBY_VERSION:="2.7.3"}"

docker build --build-arg "RUBY_VERSION=$RUBY_VERSION" -t github-pages .
docker build -t github-pages .
docker run --rm --workdir /src/gh/pages-gem github-pages script/cibuild