Skip to content

Commit

Permalink
Refactor yard docs publishing process (#1239)
Browse files Browse the repository at this point in the history
Explicitly use artifact_name for uploaded yard docs

Try artifact_name without the .zip

Try a different approach

Style fix

Only build docs for main branch
  • Loading branch information
bess authored Jan 22, 2025
1 parent 3fdf1e3 commit ccbc311
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ 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:
Expand All @@ -23,26 +16,15 @@ concurrency:
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 }}
build:
runs-on: ubuntu-latest
name: Build and deploy YARD
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec yard
shell: bash
- uses: actions/configure-pages@v5
- uses: actions/upload-artifact@v4
bundler-cache: true
- run: bundle exec yard doc
- uses: actions/upload-pages-artifact@v3
with:
# Yard puts everything into a folder called 'doc' by default
path: "doc"
- id: deployment
uses: actions/deploy-pages@v4
path: doc/
- uses: actions/deploy-pages@v4

0 comments on commit ccbc311

Please sign in to comment.