File tree 2 files changed +47
-10
lines changed
2 files changed +47
-10
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy RDoc site to Pages
2
+
3
+ on :
4
+ push :
5
+ branches : [ 'master' ]
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ contents : read
10
+ pages : write
11
+ id-token : write
12
+
13
+ concurrency :
14
+ group : " pages"
15
+ cancel-in-progress : true
16
+
17
+ jobs :
18
+ build :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Checkout
22
+ uses : actions/checkout@v3
23
+ - name : Setup Ruby
24
+ uses : ruby/setup-ruby@92aece5fc9c784ab66851c1e702b1bd5885a51f2 # v1.139.0
25
+ with :
26
+ ruby-version : ' 3.2'
27
+ bundler-cache : true
28
+ - name : Setup Pages
29
+ id : pages
30
+ uses : actions/configure-pages@v3
31
+ - name : Build with RDoc
32
+ # Outputs to the './_site' directory by default
33
+ run : bundle exec rake rdoc
34
+ - name : Upload artifact
35
+ uses : actions/upload-pages-artifact@v1
36
+
37
+ deploy :
38
+ environment :
39
+ name : github-pages
40
+ url : ${{ steps.deployment.outputs.page_url }}
41
+ runs-on : ubuntu-latest
42
+ needs : build
43
+ steps :
44
+ - name : Deploy to GitHub Pages
45
+ id : deployment
46
+ uses : actions/deploy-pages@v1
Original file line number Diff line number Diff line change @@ -26,16 +26,7 @@ RDoc::Task.new do |doc|
26
26
doc . main = "README.rdoc"
27
27
doc . title = "Rake -- Ruby Make"
28
28
doc . rdoc_files = FileList . new %w[ lib MIT-LICENSE doc/**/*.rdoc *.rdoc ]
29
- doc . rdoc_dir = "html"
30
- end
31
-
32
- task ghpages : :rdoc do
33
- %x[git checkout gh-pages]
34
- require "fileutils"
35
- FileUtils . rm_rf "/tmp/html"
36
- FileUtils . mv "html" , "/tmp"
37
- FileUtils . rm_rf "*"
38
- FileUtils . cp_r Dir . glob ( "/tmp/html/*" ) , "."
29
+ doc . rdoc_dir = "_site" # for github pages
39
30
end
40
31
41
32
task default : :test
You can’t perform that action at this time.
0 commit comments