File tree 11 files changed +586
-1
lines changed
11 files changed +586
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : respec
2
+
3
+ # author: @MikeRalphson
4
+ # issue: https://github.com/OAI/OpenAPI-Specification/issues/1564
5
+
6
+ #
7
+ # This workflow updates the respec 'pretty' rendered versions of the spec
8
+ # on the gh-pages branch when the corresponding markdown files change.
9
+ #
10
+
11
+ # run this on push to main
12
+ on :
13
+ push :
14
+ branches :
15
+ - main
16
+ workflow_dispatch : {}
17
+
18
+ jobs :
19
+ respec :
20
+
21
+ runs-on : ubuntu-latest
22
+
23
+ steps :
24
+ - uses : actions/checkout@v2 # checkout main branch
25
+
26
+ - name : Install dependencies
27
+ run : npm i
28
+
29
+ - uses : actions/checkout@v2 # checkout gh-pages branch
30
+ with :
31
+ ref : gh-pages
32
+ path : deploy
33
+
34
+ - name : run main script
35
+ run : scripts/md2html/build.sh
36
+
37
+ - name : Create Pull Request
38
+ uses : peter-evans/create-pull-request@v3
39
+ with :
40
+ token : ${{ secrets.GITHUB_TOKEN }}
41
+ branch : update-respec-version
42
+ base : gh-pages
43
+ delete-branch : true
44
+ path : deploy
45
+ labels : Housekeeping
46
+ reviewers : webron,darrelmiller
47
+ title : Update ReSpec versions
48
+ commit-message : Update ReSpec versions
49
+ signoff : true
50
+ body : |
51
+ This pull request is automatically triggered by GitHub action `respec`.
52
+
53
+ The versions/v*.md files have changed, so the HTML files are automatically being regenerated.
54
+
55
+
Original file line number Diff line number Diff line change 6
6
atlassian-ide-plugin.xml
7
7
node_modules /
8
8
package-lock.json
9
+ deploy /
10
+ history
9
11
Gemfile.lock
Original file line number Diff line number Diff line change 17
17
" README.md" ,
18
18
" schemas/*"
19
19
],
20
- "dependencies" : {},
20
+ "dependencies" : {
21
+ "cheerio" : " ^1.0.0-rc.5" ,
22
+ "highlight.js" : " ^10.6.0" ,
23
+ "markdown-it" : " ^12.0.4" ,
24
+ "yargs" : " ^12.0.5"
25
+ },
21
26
"devDependencies" : {
22
27
"@hyperjump/json-schema" : " ^0.17.0" ,
23
28
"chai" : " ^4.3.1" ,
Original file line number Diff line number Diff line change
1
+ * .err
2
+ input.bs
Original file line number Diff line number Diff line change
1
+ <!-- Global site tag (gtag.js) - Google Analytics -->
2
+ < script async src ="https://www.googletagmanager.com/gtag/js?id=UA-831873-42 "> </ script >
3
+ < script >
4
+ window . dataLayer = window . dataLayer || [ ] ;
5
+ function gtag ( ) { dataLayer . push ( arguments ) ; }
6
+ gtag ( 'js' , new Date ( ) ) ;
7
+ gtag ( 'config' , 'UA-831873-42' ) ;
8
+ </ script >
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # run this script from the root of the repo
4
+
5
+ mkdir -p deploy/oas
6
+ mkdir -p deploy/js
7
+
8
+ cd scripts/md2html
9
+ mkdir -p history
10
+ git show c740e950d:MAINTAINERS.md > history/MAINTAINERS_v2.0.md
11
+ cp -p js/* ../../deploy/js 2> /dev/null
12
+ cp -p markdown/* ../../deploy/ 2> /dev/null
13
+
14
+ node md2html.js --respec --maintainers ./history/MAINTAINERS_v2.0.md ../../versions/2.0.md > ../../deploy/oas/v2.0.html
15
+
16
+ latest=` git describe --abbrev=0 --tags`
17
+ for filename in ../../versions/[3456789].* .md ; do
18
+ version=$( basename " $filename " .md)
19
+ node md2html.js --respec --maintainers ../../MAINTAINERS.md ${filename} > ../../deploy/oas/v$version .html
20
+ if [ $version = $latest ]; then
21
+ if [[ ${version} != * " rc" * ]]; then
22
+ # version is not a Release Candidate
23
+ cp -p ../../deploy/oas/v$version .html ../../deploy/oas/latest.html
24
+ fi
25
+ fi
26
+ done
27
+
Original file line number Diff line number Diff line change
1
+ /**
2
+ * GitHub Gist Theme
3
+ * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
4
+ */
5
+
6
+ .hljs {
7
+ display : block;
8
+ background : white;
9
+ padding : 0.5em ;
10
+ color : # 333333 ;
11
+ overflow-x : auto;
12
+ }
13
+
14
+ .hljs-comment ,
15
+ .hljs-meta {
16
+ color : # 969896 ;
17
+ }
18
+
19
+ .hljs-string ,
20
+ .hljs-variable ,
21
+ .hljs-template-variable ,
22
+ .hljs-strong ,
23
+ .hljs-emphasis ,
24
+ .hljs-quote {
25
+ color : # df5000 ;
26
+ }
27
+
28
+ .hljs-keyword ,
29
+ .hljs-selector-tag ,
30
+ .hljs-type {
31
+ color : # a71d5d ;
32
+ }
33
+
34
+ .hljs-literal ,
35
+ .hljs-symbol ,
36
+ .hljs-bullet ,
37
+ .hljs-attribute {
38
+ color : # 0086b3 ;
39
+ }
40
+
41
+ .hljs-section ,
42
+ .hljs-name {
43
+ color : # 63a35c ;
44
+ }
45
+
46
+ .hljs-tag {
47
+ color : # 333333 ;
48
+ }
49
+
50
+ .hljs-title ,
51
+ .hljs-attr ,
52
+ .hljs-selector-id ,
53
+ .hljs-selector-class ,
54
+ .hljs-selector-attr ,
55
+ .hljs-selector-pseudo {
56
+ color : # 795da3 ;
57
+ }
58
+
59
+ .hljs-addition {
60
+ color : # 55a532 ;
61
+ background-color : # eaffea ;
62
+ }
63
+
64
+ .hljs-deletion {
65
+ color : # bd2c00 ;
66
+ background-color : # ffecec ;
67
+ }
68
+
69
+ .hljs-link {
70
+ text-decoration : underline;
71
+ }
You can’t perform that action at this time.
0 commit comments