.github/workflows/docs.yml
name: Docs
on:
push:
branches: [ master ]
jobs:
gendoc:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Generate docs
run: |
bundle exec yardoc --output-dir docs
cp misc/common.css docs/css/
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages