Skip to content

Commit f0513d9

Browse files
committed
Publish to new site repo
1 parent f883364 commit f0513d9

File tree

2 files changed

+63
-69
lines changed

2 files changed

+63
-69
lines changed

.github/workflows/respec.yaml

Lines changed: 43 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -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 gh-pages 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
1110
on:
1211
push:
1312
paths:
14-
- 'versions/**'
13+
- "versions/**"
1514
branches:
1615
- main
1716
workflow_dispatch: {}
1817

1918
jobs:
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
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 gh-pages branch
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.

.github/workflows/schema-publish.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ name: schema-publish
33
# author: @ralfhandl, @frankkilcommins
44

55
#
6-
# This workflow copies the x.y schemas to the gh-pages branch
6+
# This workflow creates a pull request for publishing schema iterations to the gh-pages site.
77
#
88

9-
# run this on push to main
9+
# run this on push to vX.Y-dev branches or manually
1010
on:
1111
push:
1212
branches:
13-
- 'v[0-9].[0-9]-dev'
13+
- "v[0-9].[0-9]-dev"
1414
paths:
15-
- 'src/schemas/validation/*.yaml'
16-
- 'scripts/schema-publish.sh'
17-
- '.github/workflows/schema-publish.yaml'
15+
- "src/schemas/validation/*.yaml"
16+
- "scripts/schema-publish.sh"
17+
- ".github/workflows/schema-publish.yaml"
1818
workflow_dispatch: {}
1919

2020
jobs:
@@ -29,24 +29,24 @@ jobs:
2929
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
3030
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
3131
owner: OAI
32-
repositories: OpenAPI-Specification
33-
34-
- uses: actions/checkout@v4 # checkout main branch
32+
repositories: spec.openapis.org
33+
34+
- uses: actions/checkout@v5 # checkout main branch
3535
with:
3636
fetch-depth: 0
3737

38-
- uses: actions/setup-node@v4 # setup Node.js
38+
- uses: actions/setup-node@v5 # setup Node.js
3939
with:
40-
node-version: 22.x
40+
node-version: "22.x"
4141

4242
- name: Install dependencies
4343
run: npm ci
4444

45-
- uses: actions/checkout@v4 # checkout gh-pages branch
45+
- uses: actions/checkout@v5 # checkout gh-pages branch
4646
with:
4747
token: ${{ steps.generate-token.outputs.token }}
48-
repository: OAI/OpenAPI-Specification
49-
ref: gh-pages
48+
repository: OAI/spec.openapis.org
49+
ref: main
5050
path: deploy
5151

5252
- name: run main script
@@ -56,15 +56,15 @@ jobs:
5656
uses: peter-evans/create-pull-request@v7
5757
with:
5858
token: ${{ steps.generate-token.outputs.token }}
59-
branch: publish-arazzo-schema-iteration
60-
base: gh-pages
59+
branch: arazzo-${{ github.ref_name }}-schema-iterations
60+
base: main
6161
delete-branch: true
6262
path: deploy
63-
labels: Housekeeping,Schema
64-
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
63+
labels: Arazzo,Schema
64+
reviewers: earth2marsh,lornajane,mikekistler,miqui,ralfhandl,whitlockjc,handrews,karenetheridge,frankkilcommins
6565
title: Arazzo - Publish Schema Iterations
66-
commit-message: New Arazzo schema iterations
66+
commit-message: "New Arazzo schema iterations published from ${{ github.ref_name }}"
6767
signoff: true
6868
body: |
69-
This pull request is automatically triggered by GitHub action `schema-publish` in the OAI/Arazzo-Specification repo.
69+
This pull request is automatically generated by GitHub action `schema-publish` in the OAI/Arazzo-Specification repo.
7070
The `src/schemas/validation/*.yaml` files have changed and JSON files are automatically generated.

0 commit comments

Comments
 (0)