Skip to content

Commit

Permalink
Migrate from Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rcvalle committed Jan 21, 2021
1 parent 3fe035d commit 2dbdfcd
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 21 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build

on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]

jobs:
test:
name: Build and test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec jekyll build
19 changes: 19 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: github-pages

on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]

jobs:
github-pages:
name: Build and deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Deploy to GitHub Pages
uses: helaili/jekyll-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/ruby-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ruby-gem

on:
release:
types: [published]

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Install dependencies
run: bundle install

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jekyll-theme-semantic2
======================

[![Build Status](https://travis-ci.com/rcvalle/jekyll-theme-semantic2.svg?branch=master)](https://travis-ci.com/rcvalle/jekyll-theme-semantic2)
![Build Status](https://github.com/rcvalle/jekyll-theme-semantic2/workflows/build/badge.svg)

A [Semantic UI -based](https://semantic-ui.com/) Jekyll theme.

Expand Down

0 comments on commit 2dbdfcd

Please sign in to comment.