File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 uses : actions/configure-pages@v5
4545 with :
4646 base_path : " public"
47- - name : Build documentation
48- run : bundle exec rake documentation:build
47+ - name : Build pages
48+ run : bundle exec rake github:pages
49+ - name : Extracting css
50+ run : bundle exec rougify style monokai > public/monokai.css
4951 - name : Upload artifact
5052 uses : actions/upload-pages-artifact@v3
5153 with :
Original file line number Diff line number Diff line change 1414pages :
1515 script :
1616 - bundle exec rake gitlab:page
17+ - bundle exec rougify style monokai > public/monokai.css
1718 artifacts :
1819 paths :
1920 # The folder that contains the files to be exposed at the Page URL
Original file line number Diff line number Diff line change 1+ require 'org-ruby'
2+
3+ namespace :github do
4+ desc "Build page"
5+ task :pages do
6+ readme = File . open File . expand_path ( 'README.org' )
7+ readme_content = IO . readlines ( readme )
8+ parser_options = { wrap_html : { css_files : [ "monokai.css" ] } }
9+ parser = Orgmode ::Parser . new ( readme_content , parser_options )
10+ public_dir = File . expand_path ( "public" )
11+ Dir . mkdir ( public_dir ) unless Dir . exist? ( public_dir )
12+ output = File . expand_path ( "index.html" , "public" )
13+ index = File . new ( output , 'w' )
14+ index . write ( parser . to_html )
15+ index . close
16+ end
17+ end
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ namespace :gitlab do
77 index_content = IO . readlines ( index )
88 parser_options = { wrap_html : { css_files : [ "monokai.css" ] } }
99 parser = Orgmode ::Parser . new ( index_content , parser_options )
10-
1110 public_dir = File . expand_path ( "public" )
1211 Dir . mkdir ( public_dir ) unless Dir . exist? ( public_dir )
1312 output = File . expand_path ( "index.html" , "public" )
You can’t perform that action at this time.
0 commit comments