Skip to content

Commit

Permalink
Auto-publish code docs on github (#1722)
Browse files Browse the repository at this point in the history
Co-authored-by: Bess Sadler <bess@users.noreply.github.com>
Co-authored-by: Robert-Anthony Lee-Faison <leefaisonr@users.noreply.github.com>
Co-authored-by: Bess Sadler <bess.sadler@princeton.edu>
  • Loading branch information
4 people authored Mar 28, 2024
1 parent 79ef11e commit 08381e8
Show file tree
Hide file tree
Showing 4 changed files with 44 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/deploy-yard-to-pages@v1.3.0
id: deployment
with:
# default `doc` as default of `.yardopts`
# output-dir: 'doc'
# default version is 3.2
ruby-version: '3.2'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ node_modules
# https://vitejs.dev/guide/env-and-mode.html#env-files
*.local
test_results/**
.yardoc/
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ group :development, :test do
gem "equivalent-xml", "~> 0.6.0"
gem "pry-byebug"
gem "pry-rails"
gem "yard"
end

group :development do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ GEM
xml-mapping (~> 0.10)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.36)
zeitwerk (2.6.13)

PLATFORMS
Expand Down Expand Up @@ -615,6 +616,7 @@ DEPENDENCIES
web-console (>= 4.1.0)
webmock
whenever
yard

BUNDLED WITH
2.4.20

0 comments on commit 08381e8

Please sign in to comment.