@@ -3,73 +3,67 @@ name: respec
33# author: @frankkilcommins (inspired by work from @MikeRalphson)
44
55#
6- # This workflow updates the respec 'pretty' rendered versions of the spec
7- # on the gh-pages branch when the corresponding markdown files change.
6+ # This workflow creates a pull request for publishing HTML spec versions to the spec.openapis.org site.
87#
98
10- # run this on push to main
9+ # run this on push to main with changes to files in the versions folder
1110on :
1211 push :
1312 paths :
14- - ' versions/**'
13+ - " versions/**"
1514 branches :
1615 - main
1716 workflow_dispatch : {}
1817
1918jobs :
2019 respec :
21-
2220 runs-on : ubuntu-22.04
2321
2422 steps :
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
23+ - name : Generate access token
24+ id : generate-token
25+ uses : actions/create-github-app-token@v1
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
3731
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
32+ - uses : actions/checkout@v5 # checkout main branch of this repo
33+ with :
34+ fetch-depth : 0
4435
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
36+ - uses : actions/setup-node@v5 # setup Node.js
37+ with :
38+ node-version : " 22.x"
5139
52- - name : run main script
53- run : scripts/md2html/build.sh
40+ - name : Install dependencies
41+ run : npm ci
5442
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`.
43+ - uses : actions/checkout@v5 # 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
7249
73- The `versions/*.md` files of the Arazzo Specification have changed, so the HTML files are automatically being regenerated.
50+ - name : run main script
51+ run : scripts/md2html/build.sh
7452
53+ - name : Create Pull Request
54+ uses : peter-evans/create-pull-request@v6
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`.
7568
69+ The `versions/*.md` files of the Arazzo Specification have changed and the corresponding HTML files are regenerated.
0 commit comments