# Simple workflow for deploying static content to GitHub Pages
name: rdocs

on:
  workflow_dispatch:
  push:
    tags:
      - v*.*.*

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/configure-pages@v5
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.3"
          bundler-cache: true
      - run: bundle exec rdoc
      - uses: actions/upload-pages-artifact@v4
        with:
          path: 'doc'
      - uses: actions/deploy-pages@v4
        id: deployment
