Skip to content

Commit

Permalink
Auto-generate and publish code docs (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
leefaisonr authored Apr 10, 2024
1 parent 2498560 commit 6e0dd7f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Deploy API docs to GitHub Pages
on:
push:
branches: ['main']
# paths:
# - '.github/workflows/pages.yml'
# - '.yardopts'
# - 'lib/**'
# - 'Gemfile'
# - '**.txt'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
deploy_yard:
# the deploy environment (not to be confused with env)
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
name: Build and deploy YARD
steps:
- uses: kachick/[email protected]
id: deployment
with:
# default `doc` as default of `.yardopts`
# output-dir: 'doc'
# default version is 3.2
ruby-version: '3.2'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ node_modules
!/app/assets/builds/application.css

/coverage

.yardoc/
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ group :development, :test do
gem "pry", "~> 0.14"
gem "rails-controller-testing"
gem "rspec-rails", "5.1"
gem "yard"
end

gem "bcrypt_pbkdf", "~> 1.1"
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ GEM
will_paginate (3.3.1)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.36)
zeitwerk (2.6.13)

PLATFORMS
Expand Down Expand Up @@ -569,6 +570,7 @@ DEPENDENCIES
sunspot_solr (~> 2.6)
vite_rails (~> 3.0)
will_paginate (~> 3.3)
yard

BUNDLED WITH
2.5.6

0 comments on commit 6e0dd7f

Please sign in to comment.