Skip to content

Commit 49d917a

Browse files
authored
Merge pull request #156 from OAI/main-publish-to-separate-website-repo
2 parents 24d0359 + 70e9b44 commit 49d917a

File tree

2 files changed

+32
-31
lines changed

2 files changed

+32
-31
lines changed

.github/workflows/respec.yaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: respec
22

3-
# author: @MikeRalphson
3+
# author: @MikeRalphson, @ralfhandl
44
# issue: https://github.com/OAI/OpenAPI-Specification/issues/1564
55

66
#
7-
# This workflow updates the respec 'pretty' rendered versions of the spec
8-
# on the gh-pages branch when the corresponding markdown files change.
7+
# This workflow creates a pull request for publishing HTML spec versions to the spec.openapis.org site.
98
#
109

11-
# run this on push of new spec versions to main
10+
# run this manually or on push of new spec versions to main
1211
on:
1312
push:
1413
paths:
@@ -31,9 +30,9 @@ jobs:
3130
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
3231
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
3332
owner: OAI
34-
repositories: OpenAPI-Specification
33+
repositories: spec.openapis.org
3534

36-
- uses: actions/checkout@v5 # checkout main branch
35+
- uses: actions/checkout@v5 # checkout main branch of this repo
3736
with:
3837
fetch-depth: 0
3938

@@ -44,11 +43,11 @@ jobs:
4443
- name: Install dependencies
4544
run: npm ci
4645

47-
- uses: actions/checkout@v5 # checkout gh-pages branch
46+
- uses: actions/checkout@v5 # checkout main branch of website repo
4847
with:
4948
token: ${{ steps.generate-token.outputs.token }}
50-
repository: OAI/OpenAPI-Specification # TODO: change to OAI/...
51-
ref: gh-pages
49+
repository: OAI/spec.openapis.org
50+
ref: main
5251
path: deploy
5352

5453
- name: run main script
@@ -58,16 +57,16 @@ jobs:
5857
uses: peter-evans/create-pull-request@v7
5958
with:
6059
token: ${{ steps.generate-token.outputs.token }}
61-
branch: update-overlay-respec-version
62-
base: gh-pages
60+
branch: overlay-spec-versions
61+
base: main
6362
delete-branch: true
6463
path: deploy
65-
labels: Housekeeping
66-
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl
67-
title: Overlay - Update ReSpec-rendered specification versions
64+
labels: Overlay,Specification
65+
reviewers: earth2marsh,lornajane,mikekistler,miqui,baywet,ralfhandl
66+
title: Overlay - update ReSpec-rendered specification versions
6867
commit-message: Update ReSpec-rendered specification versions
6968
signoff: true
7069
body: |
71-
This pull request is automatically triggered by GitHub action `respec` in the OAI/Overlay-Specification repo.
70+
This pull request is automatically generated by GitHub action `respec` in the OAI/Overlay-Specification repo.
7271
73-
The `versions/*.md` files have changed, so the HTML files are automatically being regenerated.
72+
The `versions/*.md` files of the OpenAPI Specification have changed and the corresponding HTML files are regenerated.

.github/workflows/schema-publish.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ name: schema-publish
33
# author: @ralfhandl
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 spec.openapis.org site.
77
#
88

9-
# run this on push to main
9+
# run this on changes to schemas to main
1010
on:
1111
push:
12+
paths:
13+
- "schemas/**"
1214
branches:
1315
- main
1416
workflow_dispatch: {}
@@ -26,9 +28,9 @@ jobs:
2628
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
2729
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
2830
owner: OAI
29-
repositories: OpenAPI-Specification
30-
31-
- uses: actions/checkout@v5 # checkout main branch
31+
repositories: spec.openapis.org
32+
33+
- uses: actions/checkout@v5 # checkout main branch of this repo
3234
with:
3335
fetch-depth: 0
3436

@@ -39,11 +41,11 @@ jobs:
3941
- name: Install dependencies
4042
run: npm ci
4143

42-
- uses: actions/checkout@v5 # checkout gh-pages branch
44+
- uses: actions/checkout@v5 # checkout main branch of website repo
4345
with:
4446
token: ${{ steps.generate-token.outputs.token }}
45-
repository: OAI/OpenAPI-Specification
46-
ref: gh-pages
47+
repository: OAI/spec.openapis.org
48+
ref: main
4749
path: deploy
4850

4951
- name: run main script
@@ -53,15 +55,15 @@ jobs:
5355
uses: peter-evans/create-pull-request@v7
5456
with:
5557
token: ${{ steps.generate-token.outputs.token }}
56-
branch: publish-overlay-schema-iteration
57-
base: gh-pages
58+
branch: overlay-schema-iterations
59+
base: main
5860
delete-branch: true
5961
path: deploy
60-
labels: Housekeeping,Schema
61-
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl
62-
title: Overlay - Publish Schema Iterations
63-
commit-message: New Overlay schema iterations
62+
labels: Overlay,Schema
63+
reviewers: earth2marsh,lornajane,mikekistler,miqui,baywet,ralfhandl
64+
title: "Overlay - publish schema iterations"
65+
commit-message: "New Overlay schema iterations published from ${{ github.ref_name }}"
6466
signoff: true
6567
body: |
66-
This pull request is automatically triggered by GitHub action `schema-publish` in the OAI/Overlay-Specification repo.
68+
This pull request is automatically generated by GitHub action `schema-publish` in the OAI/Overlay-Specification repo.
6769
The `schemas/**/*.yaml` files have changed and JSON files are automatically generated.

0 commit comments

Comments
 (0)