@@ -3,67 +3,73 @@ name: respec
33# author: @frankkilcommins (inspired by work from @MikeRalphson)
44
55#
6- # This workflow creates a pull request for publishing HTML spec versions to the spec.openapis.org site.
6+ # This workflow updates the respec 'pretty' rendered versions of the spec
7+ # on the gh-pages branch when the corresponding markdown files change.
78#
89
9- # run this on push to main with changes to files in the versions folder
10+ # run this on push to main
1011on :
1112 push :
1213 paths :
13- - " versions/**"
14+ - ' versions/**'
1415 branches :
1516 - main
1617 workflow_dispatch : {}
1718
1819jobs :
1920 respec :
21+
2022 runs-on : ubuntu-22.04
2123
2224 steps :
23- - name : Generate access token
24- id : generate-token
25- uses : actions/create-github-app-token@v2
26- with :
27- app-id : ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
28- private-key : ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
29- owner : OAI
30- repositories : spec.openapis.org
25+ - name : Generate access token
26+ id : generate-token
27+ uses : actions/create-github-app-token@v1
28+ with :
29+ app-id : ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
30+ private-key : ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
31+ owner : OAI
32+ repositories : OpenAPI-Specification
33+
34+ - uses : actions/checkout@v4 # checkout main branch
35+ with :
36+ fetch-depth : 0
3137
32- - uses : actions/checkout@v6 # checkout main branch of this repo
33- with :
34- fetch-depth : 0
38+ - uses : actions/setup-node@v4 # setup Node.js
39+ with :
40+ node-version : ' 20.x'
41+
42+ - name : Install dependencies
43+ run : npm ci
3544
36- - uses : actions/setup-node@v6 # setup Node.js
37- with :
38- node-version : " 22.x"
45+ - uses : actions/checkout@v4 # checkout gh-pages branch
46+ with :
47+ token : ${{ steps.generate-token.outputs.token }}
48+ repository : OAI/OpenAPI-Specification
49+ ref : gh-pages
50+ path : deploy
3951
40- - name : Install dependencies
41- run : npm ci
52+ - name : run main script
53+ run : scripts/md2html/build.sh
4254
43- - uses : actions/checkout@v6 # checkout main branch of website repo
44- with :
45- token : ${{ steps.generate-token.outputs.token }}
46- repository : OAI/spec.openapis.org
47- ref : main
48- path : deploy
55+ # need to create a pull request against a reomte repository here
56+ # to update the gh-pages branch on the OAI repo
57+ - name : Create Pull Request
58+ uses : peter-evans/create-pull-request@v6
59+ with :
60+ token : ${{ steps.generate-token.outputs.token }}
61+ branch : update-arazzo-respec-version
62+ base : gh-pages
63+ delete-branch : true
64+ path : deploy
65+ labels : Housekeeping
66+ reviewers : darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,karenetheridge,ralfhandl
67+ title : Arazzo - Update ReSpec-rendered specification versions
68+ commit-message : Update ReSpec-rendered specification versions
69+ signoff : true
70+ body : |
71+ This pull request is automatically triggered by GitHub action `respec`.
4972
50- - name : run main script
51- run : scripts/md2html/build.sh
73+ The `versions/*.md` files of the Arazzo Specification have changed, so the HTML files are automatically being regenerated.
5274
53- - name : Create Pull Request
54- uses : peter-evans/create-pull-request@v7
55- with :
56- token : ${{ steps.generate-token.outputs.token }}
57- branch : arazzo-spec-version
58- base : main
59- delete-branch : true
60- path : deploy
61- labels : Arazzo,Specification
62- reviewers : earth2marsh,lornajane,mikekistler,miqui,ralfhandl,whitlockjc,handrews,karenetheridge,frankkilcommins
63- title : Arazzo - update ReSpec-rendered specification versions
64- commit-message : Update ReSpec-rendered specification versions
65- signoff : true
66- body : |
67- This pull request is automatically generated by GitHub action `respec`.
6875
69- The `versions/*.md` files of the Arazzo Specification have changed and the corresponding HTML files are regenerated.
0 commit comments