Commit 08fa000 1 parent 8f9f58c commit 08fa000 Copy full SHA for 08fa000
File tree 5 files changed +33
-19
lines changed
5 files changed +33
-19
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,18 @@ jobs:
25
25
name : github-pages
26
26
url : ${{ steps.deployment.outputs.page_url }}
27
27
runs-on : ubuntu-latest
28
+ container :
29
+ image : ghcr.io/datadog/images-rb/engines/ruby:3.2
30
+ env :
31
+ BUNDLE_GEMFILE : tools/yard.gemfile
28
32
steps :
29
33
- name : Checkout
30
34
uses : actions/checkout@v4
31
- - uses : ruby/setup-ruby@v1
32
- with :
33
- ruby-version : ' 3.2'
34
- bundler-cache : true
35
+ - run : ls -al
36
+ - name : Bundle
37
+ run : bundle install
35
38
- name : Generate YARD documentation
36
- run : bundle exec rake docs
39
+ run : bundle exec rake docs --rakefile=tasks/yard.rake
37
40
- name : Setup Pages
38
41
uses : actions/configure-pages@v3
39
42
- name : Upload artifact
Original file line number Diff line number Diff line change @@ -51,8 +51,6 @@ elsif RUBY_VERSION >= '3.0.0' # No longer bundled by default since Ruby 3.0
51
51
gem 'webrick' , '>= 1.7.0'
52
52
end
53
53
54
- gem 'yard' , '~> 0.9' # NOTE: YardDoc is generated with ruby 3.2 in GitHub Actions
55
-
56
54
if RUBY_VERSION >= '2.6.0'
57
55
# 1.50 is the last version to support Ruby 2.6
58
56
gem 'rubocop' , '~> 1.50.0' , require : false
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ require 'rubocop/rake_task' if Gem.loaded_specs.key? 'rubocop'
4
4
require 'standard/rake' if Gem . loaded_specs . key? 'standard'
5
5
require 'rspec/core/rake_task'
6
6
require 'rake/extensiontask'
7
- require 'yard'
8
7
require 'os'
9
8
if Gem . loaded_specs . key? 'ruby_memcheck'
10
9
require 'ruby_memcheck'
@@ -350,17 +349,6 @@ if defined?(RuboCop::RakeTask)
350
349
end
351
350
end
352
351
353
- YARD ::Rake ::YardocTask . new ( :docs ) do |t |
354
- # Options defined in `.yardopts` are read first, then merged with
355
- # options defined here.
356
- #
357
- # It's recommended to define options in `.yardopts` instead of here,
358
- # as `.yardopts` can be read by external YARD tools, like the
359
- # hot-reload YARD server `yard server --reload`.
360
-
361
- t . options += [ '--title' , "datadog #{ Datadog ::VERSION ::STRING } documentation" ]
362
- end
363
-
364
352
# Jobs are parallelized if running in CI.
365
353
desc 'CI task; it runs all tests for current version of Ruby'
366
354
task ci : 'test:all'
Original file line number Diff line number Diff line change
1
+
2
+ if Gem . loaded_specs [ "yard" ]
3
+ require 'yard'
4
+ else
5
+ warn "'yard' gem not loaded: skipping tasks..." if Rake . verbose == true
6
+ return
7
+ end
8
+
9
+ YARD ::Rake ::YardocTask . new ( :docs ) do |t |
10
+ # Options defined in `.yardopts` are read first, then merged with
11
+ # options defined here.
12
+ #
13
+ # It's recommended to define options in `.yardopts` instead of here,
14
+ # as `.yardopts` can be read by external YARD tools, like the
15
+ # hot-reload YARD server `yard server --reload`.
16
+
17
+ t . options += [ '--title' , "datadog #{ Datadog ::VERSION ::STRING } documentation" ]
18
+ end
Original file line number Diff line number Diff line change
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '..'
4
+
5
+ gem 'rake'
6
+ gem 'yard'
7
+ gem 'redcarpet'
You can’t perform that action at this time.
0 commit comments