-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (32 loc) · 895 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Ruby
on: [push,pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.4
- name: Run unit tests and code linting
run: |
gem install bundler -v 2.2.33
bundle install
bundle exec rake
bundle exec rspec docker
bundle exec yard
- name: Deploy documentation
if: github.ref == 'refs/heads/main'
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: doc
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Release Gem
if: contains(github.ref, 'refs/tags/v')
uses: dawidd6/[email protected]
with:
github_token: ${{secrets.GITHUB_TOKEN}}
api_key: ${{secrets.RUBYGEMS_API_KEY}}