Skip to content

added github-pages environemtn #19

added github-pages environemtn

added github-pages environemtn #19

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
pages: write
id-token: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1', '3.2']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: CI=1 bundle exec rspec --format progress
docs:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.2'
bundler-cache: true
- name: Generate documentation
run: bundle exec rdoc -o docs/
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: ./docs/
if-no-files-found: warn
- name: Download documentation
uses: actions/download-artifact@v4
with:
name: documentation
path: ./docs/
- name: Deploy
uses: actions/deploy-pages@v4