Skip to content

Commit 5ef63cd

Browse files
committed
Create PR in new site repo
1 parent c22f7da commit 5ef63cd

File tree

1 file changed

+47
-38
lines changed

1 file changed

+47
-38
lines changed

.github/workflows/respec.yaml

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: respec
44
# issue: https://github.com/OAI/OpenAPI-Specification/issues/1564
55

66
#
7-
# This workflow updates the respec 'pretty' rendered versions of the spec
7+
# This workflow updates the respec 'pretty' rendered versions of the spec
88
# on the gh-pages branch when the corresponding markdown files change.
99
#
1010

@@ -14,46 +14,55 @@ on:
1414

1515
jobs:
1616
respec:
17-
if: github.ref == 'refs/heads/main'
17+
# if: github.ref == 'refs/heads/main'
1818

1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v5 # checkout main branch
23-
with:
24-
fetch-depth: 0
25-
26-
- uses: actions/setup-node@v5 # setup Node.js
27-
with:
28-
node-version: '20.x'
29-
30-
- name: Install dependencies
31-
run: npm ci
32-
33-
- uses: actions/checkout@v5 # checkout gh-pages branch
34-
with:
35-
ref: gh-pages
36-
path: deploy
37-
38-
- name: run main script
39-
run: scripts/md2html/build.sh
40-
41-
- name: Create Pull Request
42-
uses: peter-evans/create-pull-request@v6
43-
with:
44-
token: ${{ secrets.GITHUB_TOKEN }}
45-
branch: update-respec-version
46-
base: gh-pages
47-
delete-branch: true
48-
path: deploy
49-
labels: Housekeeping
50-
reviewers: earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
51-
title: Update ReSpec-rendered specification versions
52-
commit-message: Update ReSpec-rendered specification versions
53-
signoff: true
54-
body: |
55-
This pull request is automatically triggered by GitHub action `respec`.
56-
57-
The `versions/*.md` files have changed, so the HTML files are automatically being regenerated.
22+
- name: Generate access token
23+
id: generate-token
24+
uses: actions/create-github-app-token@v1
25+
with:
26+
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
27+
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
28+
owner: OAI
29+
repositories: OpenAPI-Specification
5830

31+
- uses: actions/checkout@v4 # checkout main branch
32+
with:
33+
fetch-depth: 0
5934

35+
- uses: actions/setup-node@v5 # setup Node.js
36+
with:
37+
node-version: "20.x"
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- uses: actions/checkout@v5 # checkout gh-pages branch
43+
with:
44+
token: ${{ steps.generate-token.outputs.token }}
45+
repository: OAI/spec.openapis.org
46+
ref: main
47+
path: deploy
48+
49+
- name: run main script
50+
run: scripts/md2html/build.sh
51+
52+
- name: Create Pull Request
53+
uses: peter-evans/create-pull-request@v6
54+
with:
55+
token: ${{ steps.generate-token.outputs.token }}
56+
branch: update-openapi-spec-versions
57+
base: main
58+
delete-branch: true
59+
path: deploy
60+
labels: Housekeeping
61+
reviewers: ralfhandl
62+
title: OpenAPI - Update ReSpec-rendered specification versions
63+
commit-message: Update ReSpec-rendered specification versions
64+
signoff: true
65+
body: |
66+
This pull request is automatically triggered by GitHub action `respec`.
67+
68+
The `versions/*.md` files of the OpenAPI Specification have changed and the correspondingHTML files are regenerated.

0 commit comments

Comments
 (0)