mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-04-28 11:55:00 +08:00
Replace travis with github actions (#1240)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
This commit is contained in:
36
.github/workflows/build.yml
vendored
Normal file
36
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '*' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby-version }}
|
||||
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
|
||||
|
||||
# necessary to get ruby 2.3 to work nicely with bundler vendor/bundle cache
|
||||
# can remove once ruby 2.3 is no longer supported
|
||||
- run: gem update --system
|
||||
|
||||
- run: bundle config set deployment 'true'
|
||||
- run: bundle install
|
||||
|
||||
- run: bundle exec middleman build
|
||||
32
.github/workflows/deploy.yml
vendored
Normal file
32
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master' ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ruby-version: 2.5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ env.ruby-version }}
|
||||
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
|
||||
|
||||
- run: bundle config set deployment 'true'
|
||||
- run: bundle install
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./build
|
||||
Reference in New Issue
Block a user